aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarshit Mogalapalli <[email protected]>2023-04-18 23:42:56 -0700
committerMartin K. Petersen <[email protected]>2023-05-08 07:19:20 -0400
commit2a954832015df3dc4266f73bed1b3c8b4cb9919b (patch)
tree0f6b47d414af5feb0c60c49ef2bfb0f51f50f045
parentac9a78681b921877518763ba0e89202254349d1b (diff)
scsi: mpi3mr: Use -ENOMEM instead of -1 in mpi3mr_expander_add()
smatch warnings: drivers/scsi/mpi3mr/mpi3mr_transport.c:1449 mpi3mr_expander_add() warn: returning -1 instead of -ENOMEM is sloppy No functional change. Reported-by: kernel test robot <[email protected]> Reported-by: Dan Carpenter <[email protected]> Link: https://lore.kernel.org/r/[email protected]/ Signed-off-by: Harshit Mogalapalli <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin K. Petersen <[email protected]>
-rw-r--r--drivers/scsi/mpi3mr/mpi3mr_transport.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/mpi3mr/mpi3mr_transport.c b/drivers/scsi/mpi3mr/mpi3mr_transport.c
index 4d84d5bd173f..82b55e955730 100644
--- a/drivers/scsi/mpi3mr/mpi3mr_transport.c
+++ b/drivers/scsi/mpi3mr/mpi3mr_transport.c
@@ -2058,7 +2058,7 @@ int mpi3mr_expander_add(struct mpi3mr_ioc *mrioc, u16 handle)
sas_expander = kzalloc(sizeof(struct mpi3mr_sas_node),
GFP_KERNEL);
if (!sas_expander)
- return -1;
+ return -ENOMEM;
sas_expander->handle = handle;
sas_expander->num_phys = expander_pg0.num_phys;