]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: sr: Fix typo in CDROM(CLOSETRAY|EJECT) handling
authorKevin Groeneveld <kgroeneveld@lenbrook.com>
Wed, 23 Mar 2022 00:22:42 +0000 (20:22 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Apr 2022 18:59:15 +0000 (20:59 +0200)
commit0fc31e187ab80396422b6d22af3c9bbc9569816b
tree874f928e1a56053ea88811534b4a41e36bdae958
parent5e95fe140922a77be8e50010158388a2523a9b4e
scsi: sr: Fix typo in CDROM(CLOSETRAY|EJECT) handling

[ Upstream commit d020d4759b719b273a028d45a2ea2aa5396ef646 ]

Commit 1f5f929441cf ("scsi: scsi_ioctl: Call scsi_cmd_ioctl() from
scsi_ioctl()") seems to have a typo as it is checking ret instead of cmd in
the if statement checking for CDROMCLOSETRAY and CDROMEJECT.  This changes
the behaviour of these ioctls as the cdrom_ioctl handling of these is more
restrictive than the scsi_ioctl version.

Link: https://lore.kernel.org/r/20220323002242.21157-1-kgroeneveld@lenbrook.com
Fixes: 1f5f929441cf ("scsi: scsi_ioctl: Call scsi_cmd_ioctl() from scsi_ioctl()")
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Kevin Groeneveld <kgroeneveld@lenbrook.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/scsi/sr.c