[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <0cb16d6f-098a-a8c3-09c3-273d02067ada@0882a8b5-c6c3-11e9-b005-00805fc181fe>
Date: Sat, 30 May 2020 10:32:53 +0100
From: Simon Arlott <simon@...iron.net>
To: "Martin K . Petersen" <martin.petersen@...cle.com>,
"James E.J. Bottomley" <jejb@...ux.ibm.com>,
Jens Axboe <axboe@...nel.dk>
Cc: linux-scsi@...r.kernel.org, Merlijn Wajer <merlijn@...hive.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: [PATCH 1/2] scsi: sr: Fix sr_probe() missing mutex_destroy
If the device minor cannot be allocated or the cdrom fails to be
registered then the mutex should be destroyed.
Signed-off-by: Simon Arlott <simon@...iron.net>
---
drivers/scsi/sr.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/scsi/sr.c b/drivers/scsi/sr.c
index d2fe3fa470f9..8d062d4f3ce0 100644
--- a/drivers/scsi/sr.c
+++ b/drivers/scsi/sr.c
@@ -817,6 +817,7 @@ static int sr_probe(struct device *dev)
fail_put:
put_disk(disk);
+ mutex_destroy(&cd->lock);
fail_free:
kfree(cd);
fail:
--
2.17.1
--
Simon Arlott
Powered by blists - more mailing lists