linux-stable/drivers/scsi/qedi
Dan Carpenter dc45777499 scsi: qedi: Fix error codes in qedi_alloc_global_queues()
[ Upstream commit 4dbe57d46d ]

This function had some left over code that returned 1 on error instead
negative error codes.  Convert everything to use negative error codes.  The
caller treats all non-zero returns the same so this does not affect run
time.

A couple places set "rc" instead of "status" so those error paths ended up
returning success by mistake.  Get rid of the "rc" variable and use
"status" everywhere.

Remove the bogus "status = 0" initialization, as a future proofing measure
so the compiler will warn about uninitialized error codes.

Link: https://lore.kernel.org/r/20210810084753.GD23810@kili
Fixes: ace7f46ba5 ("scsi: qedi: Add QLogic FastLinQ offload iSCSI driver framework.")
Acked-by: Manish Rangankar <mrangankar@marvell.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-09-18 13:40:14 +02:00
..
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile
qedi.h scsi: qedi: Fix cleanup session block/unblock use 2021-07-20 16:05:41 +02:00
qedi_dbg.c
qedi_dbg.h scsi: Fix various misspellings of "connect" 2019-10-24 21:22:32 -04:00
qedi_debugfs.c
qedi_fw.c scsi: qedi: Fix TMF session block/unblock use 2021-07-20 16:05:41 +02:00
qedi_fw_api.c
qedi_fw_iscsi.h
qedi_fw_scsi.h
qedi_gbl.h scsi: qedi: Add PCI shutdown handler support 2020-03-26 22:38:54 -04:00
qedi_hsi.h
qedi_iscsi.c scsi: qedi: Fix cleanup session block/unblock use 2021-07-20 16:05:41 +02:00
qedi_iscsi.h scsi: qedi: Add PCI shutdown handler support 2020-03-26 22:38:54 -04:00
qedi_main.c scsi: qedi: Fix error codes in qedi_alloc_global_queues() 2021-09-18 13:40:14 +02:00
qedi_nvm_iscsi_cfg.h
qedi_sysfs.c
qedi_version.h