scsi: myrs: Fix uninitialized variable
authorYueHaibing <yuehaibing@huawei.com>
Thu, 9 May 2019 15:22:47 +0000 (23:22 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Mon, 20 May 2019 14:56:43 +0000 (10:56 -0400)
commit41552199b5518fe26bee0829a28dd1880441b430
tree4833ff7ee84b433ba835e704d7804940a6113ee2
parent69b9c52ca5c052b807a69712a9ee1d6f085bcb4f
scsi: myrs: Fix uninitialized variable

drivers/scsi/myrs.c: In function 'myrs_log_event':
drivers/scsi/myrs.c:821:24: warning: 'sshdr.sense_key' may be used uninitialized in this function [-Wmaybe-uninitialized]
  struct scsi_sense_hdr sshdr;

If ev->ev_code is not 0x1C, sshdr.sense_key may be used uninitialized. Fix
this by initializing variable 'sshdr' to 0.

Fixes: 77266186397c ("scsi: myrs: Add Mylex RAID controller (SCSI interface)")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/myrs.c