WSL2-Linux-Kernel/drivers/scsi/qedf
Dan Carpenter ccc89737aa scsi: qedf: Fix error codes in qedf_alloc_global_queues()
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>
2021-08-16 13:27:57 -04:00
..
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
drv_fcoe_fw_funcs.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 440 2019-06-05 17:37:17 +02:00
drv_fcoe_fw_funcs.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 440 2019-06-05 17:37:17 +02:00
drv_scsi_fw_funcs.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 440 2019-06-05 17:37:17 +02:00
drv_scsi_fw_funcs.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 440 2019-06-05 17:37:17 +02:00
qedf.h scsi: qedf: Enable devlink support 2021-04-13 00:26:11 -04:00
qedf_attr.c scsi: qedf: Use DEVICE_ATTR_RO() macro 2021-06-22 23:00:02 -04:00
qedf_dbg.c scsi: qedf: Use vzalloc() instead of vmalloc()/memset(0) 2021-05-21 16:31:17 -04:00
qedf_dbg.h scsi: qedf: Remove unused include of linux/version.h 2021-04-05 23:45:23 -04:00
qedf_debugfs.c scsi: qedf: Demote obvious misuse of kerneldoc to standard comment blocks 2020-07-15 16:01:58 -04:00
qedf_els.c scsi: qedf: Correct the comment in qedf_initiate_els 2020-09-08 23:14:16 -04:00
qedf_fip.c scsi: qedf: Remove redundant initialization of variable rc 2020-06-02 21:44:14 -04:00
qedf_hsi.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 440 2019-06-05 17:37:17 +02:00
qedf_io.c scsi: qedf: Use scsi_cmd_to_rq() instead of scsi_cmnd.request 2021-08-11 22:25:40 -04:00
qedf_main.c scsi: qedf: Fix error codes in qedf_alloc_global_queues() 2021-08-16 13:27:57 -04:00
qedf_version.h scsi: qedf: Update the version to 8.42.3.0 2019-08-29 18:51:19 -04:00