aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-10-13 17:47:51 +0200
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-10-13 17:47:51 +0200
commit249aa4ff1778b318346d8ba4a7fa62c169a29410 (patch)
treefd8d12836ce6cc7b2ec6dae8813ae43b26f0edba
parent3b4024d4297279ef85631f3c19a6fa4312b4c401 (diff)
downloadlinux-249aa4ff1778b318346d8ba4a7fa62c169a29410.tar.gz
cs5535: check ide_config_drive_speed() return value
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
-rw-r--r--drivers/ide/pci/cs5535.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/ide/pci/cs5535.c b/drivers/ide/pci/cs5535.c
index 383b7eccbcb..5d1be657adc 100644
--- a/drivers/ide/pci/cs5535.c
+++ b/drivers/ide/pci/cs5535.c
@@ -141,7 +141,9 @@ static void cs5535_set_speed(ide_drive_t *drive, const u8 speed)
*/
static int cs5535_set_drive(ide_drive_t *drive, u8 speed)
{
- ide_config_drive_speed(drive, speed);
+ if (ide_config_drive_speed(drive, speed))
+ return 1;
+
cs5535_set_speed(drive, speed);
return 0;
@@ -157,7 +159,9 @@ static int cs5535_set_drive(ide_drive_t *drive, u8 speed)
static void cs5535_set_pio_mode(ide_drive_t *drive, const u8 pio)
{
- ide_config_drive_speed(drive, XFER_PIO_0 + pio);
+ if (ide_config_drive_speed(drive, XFER_PIO_0 + pio))
+ return;
+
cs5535_set_speed(drive, XFER_PIO_0 + pio);
}