mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-11-05 18:59:58 +00:00
cdrom_open() forgets to unlock on -EROFS failure exits
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
This commit is contained in:
parent
4942de4a0e
commit
ae3ba4fd96
1 changed files with 4 additions and 0 deletions
|
@ -1032,6 +1032,10 @@ int cdrom_open(struct cdrom_device_info *cdi, struct inode *ip, struct file *fp)
|
|||
check_disk_change(ip->i_bdev);
|
||||
return 0;
|
||||
err_release:
|
||||
if (CDROM_CAN(CDC_LOCK) && cdi->options & CDO_LOCK) {
|
||||
cdi->ops->lock_door(cdi, 0);
|
||||
cdinfo(CD_OPEN, "door unlocked.\n");
|
||||
}
|
||||
cdi->ops->release(cdi);
|
||||
err:
|
||||
cdi->use_count--;
|
||||
|
|
Loading…
Reference in a new issue