Message ID | 06e9de38-eeed-1cab-5e08-e889288935b3@0882a8b5-c6c3-11e9-b005-00805fc181fe (mailing list archive) |
---|---|
State | Mainlined |
Commit | a247e07f8dadba5da9f188aaf4f96db0302146d9 |
Headers | show |
Series | [v2,1/2] scsi: sr: Fix sr_probe() missing mutex_destroy | expand |
On Sat, 30 May 2020 18:58:25 +0100, Simon Arlott wrote: > If the device minor cannot be allocated or the cdrom fails to be > registered then the mutex should be destroyed. Applied to 5.8/scsi-queue, thanks! [1/2] scsi: sr: Fix sr_probe() missing mutex_destroy https://git.kernel.org/mkp/scsi/c/a247e07f8dad [2/2] scsi: sr: Fix sr_probe() missing deallocate of device minor https://git.kernel.org/mkp/scsi/c/6555781b3fde
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: