scsi: sr: Fix sr_probe() missing deallocate of device minor
authorSimon Arlott <simon@octiron.net>
Sat, 30 May 2020 17:59:44 +0000 (18:59 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 Jun 2020 15:50:19 +0000 (17:50 +0200)
commit08d2ea2e236a6765d447af6baf0bc8fac3221b7f
tree17ba800473686654d4e1c2bdab87c3f36f2feb65
parent8f73ac0b64341c62f7707ac825b1728d8f75ddf6
scsi: sr: Fix sr_probe() missing deallocate of device minor

[ Upstream commit 6555781b3fdec5e94e6914511496144241df7dee ]

If the cdrom fails to be registered then the device minor should be
deallocated.

Link: https://lore.kernel.org/r/072dac4b-8402-4de8-36bd-47e7588969cd@0882a8b5-c6c3-11e9-b005-00805fc181fe
Signed-off-by: Simon Arlott <simon@octiron.net>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/scsi/sr.c