diff options
Diffstat (limited to 'drivers/ide/ide-proc.c')
-rw-r--r-- | drivers/ide/ide-proc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/ide/ide-proc.c b/drivers/ide/ide-proc.c index 54d57a15d59e..151c91e933da 100644 --- a/drivers/ide/ide-proc.c +++ b/drivers/ide/ide-proc.c | |||
@@ -345,7 +345,7 @@ static int set_xfer_rate (ide_drive_t *drive, int arg) | |||
345 | ide_task_t task; | 345 | ide_task_t task; |
346 | int err; | 346 | int err; |
347 | 347 | ||
348 | if (arg < 0 || (arg > 1 && arg < XFER_PIO_0) || arg > XFER_UDMA_6) | 348 | if (arg < XFER_PIO_0 || arg > XFER_UDMA_6) |
349 | return -EINVAL; | 349 | return -EINVAL; |
350 | 350 | ||
351 | memset(&task, 0, sizeof(task)); | 351 | memset(&task, 0, sizeof(task)); |
@@ -357,7 +357,7 @@ static int set_xfer_rate (ide_drive_t *drive, int arg) | |||
357 | 357 | ||
358 | err = ide_no_data_taskfile(drive, &task); | 358 | err = ide_no_data_taskfile(drive, &task); |
359 | 359 | ||
360 | if (!err && arg) { | 360 | if (!err) { |
361 | ide_set_xfer_rate(drive, (u8) arg); | 361 | ide_set_xfer_rate(drive, (u8) arg); |
362 | ide_driveid_update(drive); | 362 | ide_driveid_update(drive); |
363 | } | 363 | } |