diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2022-07-18 14:20:50 +0300 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2022-07-18 23:03:56 -0400 |
commit | 2a8a0147cb523ff8c21e57195dae1833b35dafaf (patch) | |
tree | 3e776934baeab04510940126fe547dd2ff5199b5 /drivers/scsi/mpi3mr | |
parent | cf1ce8b715240e3e4a86162788958444e9208472 (diff) | |
download | linux-2a8a0147cb523ff8c21e57195dae1833b35dafaf.tar.gz linux-2a8a0147cb523ff8c21e57195dae1833b35dafaf.tar.bz2 linux-2a8a0147cb523ff8c21e57195dae1833b35dafaf.zip |
scsi: mpi3mr: Unlock on error path
There is some clean up necessary before returning. Smatch complains:
drivers/scsi/mpi3mr/mpi3mr_fw.c:4786 mpi3mr_soft_reset_handler()
warn: inconsistent returns '&mrioc->reset_mutex'.
Locked on : 4730
Unlocked on: 4786
Link: https://lore.kernel.org/r/YtVCEsxMU8buuMjP@kili
Fixes: f10af057325c ("scsi: mpi3mr: Resource Based Metering")
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_fw.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/mpi3mr/mpi3mr_fw.c b/drivers/scsi/mpi3mr/mpi3mr_fw.c index 6e39f7969e63..0866dfd43318 100644 --- a/drivers/scsi/mpi3mr/mpi3mr_fw.c +++ b/drivers/scsi/mpi3mr/mpi3mr_fw.c @@ -4727,7 +4727,8 @@ int mpi3mr_soft_reset_handler(struct mpi3mr_ioc *mrioc, "max io throttle group doesn't match old(%d), new(%d)\n", mrioc->num_io_throttle_group, mrioc->facts.max_io_throttle_group); - return -EPERM; + retval = -EPERM; + goto out; } mpi3mr_flush_delayed_cmd_lists(mrioc); |