diff options
author | Auke Kok <auke-jan.h.kok@intel.com> | 2006-06-21 16:43:50 -0400 |
---|---|---|
committer | Auke-jan Kok <ahkok@gitlost.site> | 2006-06-21 16:43:50 -0400 |
commit | 0d204094d15dac2e8a439b993f71eda385b4dccd (patch) | |
tree | 647f0ddec94d0fb4aaf74fa55bcad75946030f8a /drivers/cdrom/cdrom.c | |
parent | a487a8f7b6947f6445e5a1aa876522916785d5ec (diff) | |
parent | 612eff0e3715a6faff5ba1b74873b99e036c59fe (diff) |
Merge branch 'upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
Diffstat (limited to 'drivers/cdrom/cdrom.c')
-rw-r--r-- | drivers/cdrom/cdrom.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c index a59876a0bfa1..3170eaa25087 100644 --- a/drivers/cdrom/cdrom.c +++ b/drivers/cdrom/cdrom.c | |||
@@ -1009,9 +1009,9 @@ int cdrom_open(struct cdrom_device_info *cdi, struct inode *ip, struct file *fp) | |||
1009 | if (fp->f_mode & FMODE_WRITE) { | 1009 | if (fp->f_mode & FMODE_WRITE) { |
1010 | ret = -EROFS; | 1010 | ret = -EROFS; |
1011 | if (cdrom_open_write(cdi)) | 1011 | if (cdrom_open_write(cdi)) |
1012 | goto err; | 1012 | goto err_release; |
1013 | if (!CDROM_CAN(CDC_RAM)) | 1013 | if (!CDROM_CAN(CDC_RAM)) |
1014 | goto err; | 1014 | goto err_release; |
1015 | ret = 0; | 1015 | ret = 0; |
1016 | cdi->media_written = 0; | 1016 | cdi->media_written = 0; |
1017 | } | 1017 | } |
@@ -1026,6 +1026,8 @@ int cdrom_open(struct cdrom_device_info *cdi, struct inode *ip, struct file *fp) | |||
1026 | not be mounting, but opening with O_NONBLOCK */ | 1026 | not be mounting, but opening with O_NONBLOCK */ |
1027 | check_disk_change(ip->i_bdev); | 1027 | check_disk_change(ip->i_bdev); |
1028 | return 0; | 1028 | return 0; |
1029 | err_release: | ||
1030 | cdi->ops->release(cdi); | ||
1029 | err: | 1031 | err: |
1030 | cdi->use_count--; | 1032 | cdi->use_count--; |
1031 | return ret; | 1033 | return ret; |