* [PATCH] scsi: mpi3mr: unlock on error path
@ 2022-07-18 11:20 Dan Carpenter
2022-07-19 2:39 ` Martin K. Petersen
2022-07-27 3:15 ` Martin K. Petersen
0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2022-07-18 11:20 UTC (permalink / raw)
To: Sathya Prakash Veerichetty
Cc: Kashyap Desai, Sumit Saxena, Sreekanth Reddy,
James E.J. Bottomley, Martin K. Petersen, mpi3mr-linuxdrv.pdl,
linux-scsi, kernel-janitors
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
Fixes: fded192f1303 ("scsi: mpi3mr: Resource Based Metering")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
drivers/scsi/mpi3mr/mpi3mr_fw.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
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);
--
2.35.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] scsi: mpi3mr: unlock on error path
2022-07-18 11:20 [PATCH] scsi: mpi3mr: unlock on error path Dan Carpenter
@ 2022-07-19 2:39 ` Martin K. Petersen
2022-07-27 3:15 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2022-07-19 2:39 UTC (permalink / raw)
To: Dan Carpenter
Cc: Sathya Prakash Veerichetty, Kashyap Desai, Sumit Saxena,
Sreekanth Reddy, James E.J. Bottomley, Martin K. Petersen,
mpi3mr-linuxdrv.pdl, linux-scsi, kernel-janitors
Dan,
> 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
Applied to 5.20/scsi-staging, thanks!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] scsi: mpi3mr: unlock on error path
2022-07-18 11:20 [PATCH] scsi: mpi3mr: unlock on error path Dan Carpenter
2022-07-19 2:39 ` Martin K. Petersen
@ 2022-07-27 3:15 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2022-07-27 3:15 UTC (permalink / raw)
To: Sathya Prakash Veerichetty, Dan Carpenter
Cc: Martin K . Petersen, Kashyap Desai, mpi3mr-linuxdrv.pdl,
linux-scsi, Sreekanth Reddy, Sumit Saxena, James E.J. Bottomley,
kernel-janitors
On Mon, 18 Jul 2022 14:20:50 +0300, Dan Carpenter wrote:
> 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
>
> [...]
Applied to 5.20/scsi-queue, thanks!
[1/1] scsi: mpi3mr: unlock on error path
https://git.kernel.org/mkp/scsi/c/2a8a0147cb52
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-07-27 3:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-18 11:20 [PATCH] scsi: mpi3mr: unlock on error path Dan Carpenter
2022-07-19 2:39 ` Martin K. Petersen
2022-07-27 3:15 ` Martin K. Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox