diff options
Diffstat (limited to 'drivers/ide/ide-gd.c')
-rw-r--r-- | drivers/ide/ide-gd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/ide/ide-gd.c b/drivers/ide/ide-gd.c index d44898f46c33..d367473098f9 100644 --- a/drivers/ide/ide-gd.c +++ b/drivers/ide/ide-gd.c | |||
@@ -202,7 +202,7 @@ static int ide_gd_open(struct inode *inode, struct file *filp) | |||
202 | goto out_put_idkp; | 202 | goto out_put_idkp; |
203 | } | 203 | } |
204 | 204 | ||
205 | if ((drive->dev_flags & IDE_DFLAG_WP) && (filp->f_mode & 2)) { | 205 | if ((drive->dev_flags & IDE_DFLAG_WP) && (filp->f_mode & FMODE_WRITE)) { |
206 | ret = -EROFS; | 206 | ret = -EROFS; |
207 | goto out_put_idkp; | 207 | goto out_put_idkp; |
208 | } | 208 | } |