lkml.org 
[lkml]   [2014]   [May]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 1/1 RESEND] drivers/scsi/sd.c: remove positive test on unsigned value
val is unsigned.

Cc: "James E.J. Bottomley" <JBottomley@parallels.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
drivers/scsi/sd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index efcbcd1..b54d4f8 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -296,7 +296,7 @@ protection_type_store(struct device *dev, struct device_attribute *attr,
if (err)
return err;

- if (val >= 0 && val <= SD_DIF_TYPE3_PROTECTION)
+ if (val <= SD_DIF_TYPE3_PROTECTION)
sdkp->protection_type = val;

return count;
--
1.8.4.5


\
 
 \ /
  Last update: 2014-05-10 13:21    [W:0.030 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site