diff options
author | Artem Chernyshev <artem.chernyshev@red-soft.ru> | 2023-11-28 12:10:08 +0100 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2023-12-06 03:01:52 +0100 |
commit | f5f27a332a14f43463aa0075efa3a0c662c0f4a8 (patch) | |
tree | e5016cd051de591cb546739c2658e62316185d7f /drivers/scsi | |
parent | scsi: ufs: dt-bindings: Add msi-parent for UFS MCQ (diff) | |
download | linux-f5f27a332a14f43463aa0075efa3a0c662c0f4a8.tar.xz linux-f5f27a332a14f43463aa0075efa3a0c662c0f4a8.zip |
scsi: fnic: Return error if vmalloc() failed
In fnic_init_module() exists redundant check for return value from
fnic_debugfs_init(), because at moment it only can return zero. It make
sense to process theoretical vmalloc() failure.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Fixes: 9730ddfb123d ("scsi: fnic: remove redundant assignment of variable rc")
Signed-off-by: Artem Chernyshev <artem.chernyshev@red-soft.ru>
Link: https://lore.kernel.org/r/20231128111008.2280507-1-artem.chernyshev@red-soft.ru
Reviewed-by: Karan Tilak Kumar <kartilak@cisco.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/fnic/fnic_debugfs.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/fnic/fnic_debugfs.c b/drivers/scsi/fnic/fnic_debugfs.c index c4d9ed0d7d75..2619a2d4f5f1 100644 --- a/drivers/scsi/fnic/fnic_debugfs.c +++ b/drivers/scsi/fnic/fnic_debugfs.c @@ -52,9 +52,10 @@ int fnic_debugfs_init(void) fc_trc_flag->fnic_trace = 2; fc_trc_flag->fc_trace = 3; fc_trc_flag->fc_clear = 4; + return 0; } - return 0; + return -ENOMEM; } /* |