summaryrefslogtreecommitdiff
path: root/drivers/scsi/mpi3mr
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2022-09-15 14:11:04 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2022-09-15 22:04:02 -0400
commit5ba207e55e7fdfa5f30737d2b234bf5b70fa3bfe (patch)
tree2e6a3efdeb6160e33de0ff11bf12d95d2d12f488 /drivers/scsi/mpi3mr
parenta113c02f57388fc4d179ac5580303d97a000ede7 (diff)
downloadlwn-5ba207e55e7fdfa5f30737d2b234bf5b70fa3bfe.tar.gz
lwn-5ba207e55e7fdfa5f30737d2b234bf5b70fa3bfe.zip
scsi: mpi3mr: Fix error code in mpi3mr_transport_smp_handler()
The error code from mpi3mr_post_transport_req() is supposed to be passed to bsg_job_done(job, rc, reslen), but it isn't. Link: https://lore.kernel.org/r/YyMISJzVDARpVwrr@kili Fixes: 176d4aa69c6e ("scsi: mpi3mr: Support SAS transport class callbacks") Acked-by: Sathya Prakash Veerichetty <sathya.prakash@broadcom.com> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/mpi3mr')
-rw-r--r--drivers/scsi/mpi3mr/mpi3mr_transport.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/scsi/mpi3mr/mpi3mr_transport.c b/drivers/scsi/mpi3mr/mpi3mr_transport.c
index 74313cf68ad3..3fc897336b5e 100644
--- a/drivers/scsi/mpi3mr/mpi3mr_transport.c
+++ b/drivers/scsi/mpi3mr/mpi3mr_transport.c
@@ -3245,8 +3245,10 @@ mpi3mr_transport_smp_handler(struct bsg_job *job, struct Scsi_Host *shost,
dprint_transport_info(mrioc, "sending SMP request\n");
- if (mpi3mr_post_transport_req(mrioc, &mpi_request, request_sz,
- &mpi_reply, reply_sz, MPI3MR_INTADMCMD_TIMEOUT, &ioc_status))
+ rc = mpi3mr_post_transport_req(mrioc, &mpi_request, request_sz,
+ &mpi_reply, reply_sz,
+ MPI3MR_INTADMCMD_TIMEOUT, &ioc_status);
+ if (rc)
goto unmap_in;
dprint_transport_info(mrioc,