Skip to contentSkip to conversation

scsi_debug: add missing csum var initialization

PATCH New Antonio Alecrim Jr 1 participant 1 message Sep 13, 2013 SCSI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scsi_debug: add missing csum var initialization

Removes the warning:
include/uapi/linux/swab.h:106:23: warning: ‘csum’ may be used uninitialized in this function

---
 drivers/scsi/scsi_debug.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/scsi_debug.c +1 -1
index 01c0ffa..f149747 100644
@@ -1733,7 +1733,7 @@ static int do_device_access(struct scsi_cmnd *scmd,
 
 static u16 dif_compute_csum(const void *buf, int len)
 {
-	u16 csum;
+	u16 csum = 0;
 
 	switch (scsi_debug_guard) {
 	case 1:
Signature · 6 lines
1.8.3.1

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html