aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsicam.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2018-11-02 16:35:48 +0100
committerMartin K. Petersen <martin.petersen@oracle.com>2018-11-05 22:35:01 -0500
commitf8d294324598ec85bea2779512e48c94cbe4d7c6 (patch)
treea8ff350ede3447381efbd8b163a1b98278bc87af /drivers/scsi/scsicam.c
parentscsi: myrb: fix sprintf buffer overflow warning (diff)
downloadlinux-dev-f8d294324598ec85bea2779512e48c94cbe4d7c6.tar.xz
linux-dev-f8d294324598ec85bea2779512e48c94cbe4d7c6.zip
scsi: lpfc: fix remoteport access
The addition of a spinlock in lpfc_debugfs_nodelist_data() introduced a bug that lets us not skip NULL pointers correctly, as noticed by gcc-8: drivers/scsi/lpfc/lpfc_debugfs.c: In function 'lpfc_debugfs_nodelist_data.constprop': drivers/scsi/lpfc/lpfc_debugfs.c:728:13: error: 'nrport' may be used uninitialized in this function [-Werror=maybe-uninitialized] if (nrport->port_role & FC_PORT_ROLE_NVME_INITIATOR) This changes the logic back to what it was, while keeping the added spinlock. Fixes: 9e210178267b ("scsi: lpfc: Synchronize access to remoteport via rport") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/scsicam.c')
0 files changed, 0 insertions, 0 deletions