Skip to contentSkip to conversation

scsi: Remove unnecessary comparison

PATCH New Pranith Kumar 1 participant 1 message Aug 11, 2016 SCSI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scsi: Remove unnecessary comparison

val is an unsigned int which makes the comparison >=0 unnecessary. This patch removes it.

---
 drivers/scsi/sd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/sd.c +1 -1
index d3e852a..7a919b2 100644
@@ -314,7 +314,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;
Signature · 1 line
2.9.2