aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/card/block.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-09-06 09:31:03 -0400
committerIngo Molnar <mingo@elte.hu>2008-09-06 09:31:03 -0400
commit77dd3b3bd23111040c504be6bd873a5ad09f02df (patch)
tree119ddcdf89d6a593a8fefea530249084559eeb44 /drivers/mmc/card/block.c
parent916c7a855174e3b53d182b97a26b2e27a29726a1 (diff)
parent70bb08962ea9bd50797ae9f16b2493f5f7c65053 (diff)
Merge branch 'linus' into timers/ntp
Diffstat (limited to 'drivers/mmc/card/block.c')
-rw-r--r--drivers/mmc/card/block.c4
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)
103 check_disk_change(inode->i_bdev); 103 check_disk_change(inode->i_bdev);
104 ret = 0; 104 ret = 0;
105 105
106 if ((filp->f_mode & FMODE_WRITE) && md->read_only) 106 if ((filp->f_mode & FMODE_WRITE) && md->read_only) {
107 mmc_blk_put(md);
107 ret = -EROFS; 108 ret = -EROFS;
109 }
108 } 110 }
109 111
110 return ret; 112 return ret;