LKML Archive mirror
 help / color / mirror / Atom feed
* [PATCH] scsi: sun3_NCR5380.c:  Cleaning up uninitialized variables
@ 2014-06-01 13:18 Rickard Strandqvist
  0 siblings, 0 replies; only message in thread
From: Rickard Strandqvist @ 2014-06-01 13:18 UTC (permalink / raw
  To: James E.J. Bottomley, linux-scsi; +Cc: Rickard Strandqvist, linux-kernel

There is a risk that the variable will be used without being initialized.

This was largely found by using a static code analysis program called cppcheck.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
---
 drivers/scsi/sun3_NCR5380.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/sun3_NCR5380.c b/drivers/scsi/sun3_NCR5380.c
index 636bbe0..93f3fd5 100644
--- a/drivers/scsi/sun3_NCR5380.c
+++ b/drivers/scsi/sun3_NCR5380.c
@@ -2442,7 +2442,7 @@ static void NCR5380_reselect (struct Scsi_Host *instance)
     unsigned char target_mask;
     unsigned char lun;
 #ifdef SUPPORT_TAGS
-    unsigned char tag;
+    unsigned char tag = TAG_NONE;
 #endif
     unsigned char msg[3];
     struct scsi_cmnd *tmp = NULL, *prev;
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-06-01 13:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-01 13:18 [PATCH] scsi: sun3_NCR5380.c: Cleaning up uninitialized variables Rickard Strandqvist

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).