kernel_optimize_test/drivers/scsi/qedf
Dan Carpenter 1bc19e4062 scsi: qedf: Fix error codes in qedf_alloc_global_queues()
[ Upstream commit ccc89737aa6b9f248cf1623014038beb6c2b7f56 ]

This driver has some left over "return 1" on failure style code mixed with
"return negative error codes" style code.  The caller doesn't care so we
should just convert everything to return negative error codes.

Then there was a problem that there were two variables used to store error
codes which just resulted in confusion.  If qedf_alloc_bdq() returned a
negative error code, we accidentally returned success instead of
propagating the error code.  So get rid of the "rc" variable and use
"status" every where.

Also remove the "status = 0" initialization so that these sorts of bugs
will be detected by the compiler in the future.

Link: https://lore.kernel.org/r/20210810085023.GA23998@kili
Fixes: 61d8658b4a ("scsi: qedf: Add QLogic FastLinQ offload FCoE 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
..
drv_fcoe_fw_funcs.c
drv_fcoe_fw_funcs.h
drv_scsi_fw_funcs.c
drv_scsi_fw_funcs.h
Kconfig
Makefile
qedf_attr.c
qedf_dbg.c
qedf_dbg.h
qedf_debugfs.c
qedf_els.c
qedf_fip.c
qedf_hsi.h
qedf_io.c scsi: qedf: Add check to synchronize abort and flush 2021-07-25 14:36:16 +02:00
qedf_main.c scsi: qedf: Fix error codes in qedf_alloc_global_queues() 2021-09-18 13:40:14 +02:00
qedf_version.h
qedf.h