1
0
Fork 0
freescale-linux-fslc/drivers/scsi/megaraid
Arnd Bergmann 3deb9438d3 megaraid_sas: add missing curly braces in ioctl handler
gcc-6 found a dubious indentation in the megasas_mgmt_fw_ioctl
function:

drivers/scsi/megaraid/megaraid_sas_base.c: In function 'megasas_mgmt_fw_ioctl':
drivers/scsi/megaraid/megaraid_sas_base.c:6658:4: warning: statement is indented as if it were guarded by... [-Wmisleading-indentation]
    kbuff_arr[i] = NULL;
    ^~~~~~~~~
drivers/scsi/megaraid/megaraid_sas_base.c:6653:3: note: ...this 'if' clause, but it is not
   if (kbuff_arr[i])
   ^~

The code is actually correct, as there is no downside in clearing a NULL
pointer again.

This clarifies the code and avoids the warning by adding extra curly
braces.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 90dc9d98f0 ("megaraid_sas : MFI MPT linked list corruption fix")
Reviewed-by: Hannes Reinecke <hare@suse.com>
Acked-by: Sumit Saxena <sumit.saxena@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2016-03-18 15:22:55 -04:00
..
Kconfig.megaraid
Makefile [SCSI] megaraid_sas: Add 9565/9285 specific code 2010-12-22 23:26:53 -06:00
mbox_defs.h Fix common misspellings 2011-03-31 11:26:23 -03:00
mega_common.h scsi: use 64-bit LUNs 2014-07-17 22:07:37 +02:00
megaraid_ioctl.h
megaraid_mbox.c scsi: drop reason argument from ->change_queue_depth 2014-11-24 14:45:27 +01:00
megaraid_mbox.h
megaraid_mm.c megaraid: Fix possible NULL pointer deference in mraid_mm_ioctl 2016-01-08 13:03:53 -05:00
megaraid_mm.h
megaraid_sas.h megaraid_sas: Don't issue kill adapter for MFI controllers in case of PD list DCMD failure 2016-03-10 20:25:31 -05:00
megaraid_sas_base.c megaraid_sas: add missing curly braces in ioctl handler 2016-03-18 15:22:55 -04:00
megaraid_sas_fp.c megaraid_sas: Fastpath region lock bypass 2016-02-23 21:27:02 -05:00
megaraid_sas_fusion.c megaraid_sas: Add an i/o barrier 2016-02-23 21:27:02 -05:00
megaraid_sas_fusion.h megaraid_sas: Reply Descriptor Post Queue (RDPQ) support 2016-02-23 21:27:02 -05:00