diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2008-10-09 22:31:58 +0200 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-10-09 22:31:58 +0200 |
commit | 9e165acf1b9e37af7c0fa39399b43d0bd8600039 (patch) | |
tree | 7ffdb0ad4c35ac9c19c4096b4f22ccc9b1eeefad /drivers/mmc/card/block.c | |
parent | Merge branch 'ptebits' into devel (diff) | |
parent | [ARM] 5267/1: [AT91] Name conflict in mach-at91/leds.c (diff) | |
download | linux-9e165acf1b9e37af7c0fa39399b43d0bd8600039.tar.xz linux-9e165acf1b9e37af7c0fa39399b43d0bd8600039.zip |
Merge branch 'at91' into devel
Diffstat (limited to 'drivers/mmc/card/block.c')
-rw-r--r-- | drivers/mmc/card/block.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c index 86dbb366415a..6986f3926244 100644 --- a/drivers/mmc/card/block.c +++ b/drivers/mmc/card/block.c @@ -103,8 +103,10 @@ static int mmc_blk_open(struct inode *inode, struct file *filp) check_disk_change(inode->i_bdev); ret = 0; - if ((filp->f_mode & FMODE_WRITE) && md->read_only) + if ((filp->f_mode & FMODE_WRITE) && md->read_only) { + mmc_blk_put(md); ret = -EROFS; + } } return ret; |