Commit 2a8a0147 authored by Dan Carpenter's avatar Dan Carpenter Committed by Martin K. Petersen
Browse files

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: f10af057 ("scsi: mpi3mr: Resource Based Metering")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent cf1ce8b7
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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);