diff options
Diffstat (limited to 'drivers/ide/ide-floppy_ioctl.c')
-rw-r--r-- | drivers/ide/ide-floppy_ioctl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/ide/ide-floppy_ioctl.c b/drivers/ide/ide-floppy_ioctl.c index 409e4c15f9b7..0d5f5054ab64 100644 --- a/drivers/ide/ide-floppy_ioctl.c +++ b/drivers/ide/ide-floppy_ioctl.c | |||
@@ -250,7 +250,7 @@ static int ide_floppy_format_ioctl(ide_drive_t *drive, struct file *file, | |||
250 | case IDEFLOPPY_IOCTL_FORMAT_GET_CAPACITY: | 250 | case IDEFLOPPY_IOCTL_FORMAT_GET_CAPACITY: |
251 | return ide_floppy_get_format_capacities(drive, argp); | 251 | return ide_floppy_get_format_capacities(drive, argp); |
252 | case IDEFLOPPY_IOCTL_FORMAT_START: | 252 | case IDEFLOPPY_IOCTL_FORMAT_START: |
253 | if (!(file->f_mode & 2)) | 253 | if (!(file->f_mode & FMODE_WRITE)) |
254 | return -EPERM; | 254 | return -EPERM; |
255 | return ide_floppy_format_unit(drive, (int __user *)argp); | 255 | return ide_floppy_format_unit(drive, (int __user *)argp); |
256 | case IDEFLOPPY_IOCTL_FORMAT_GET_PROGRESS: | 256 | case IDEFLOPPY_IOCTL_FORMAT_GET_PROGRESS: |