From: Bartlomiej Zolnierkiewicz Date: Sat, 13 Oct 2007 15:47:51 +0000 (+0200) Subject: cs5535: check ide_config_drive_speed() return value X-Git-Tag: v2.6.24-rc1~1363^2~9 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=249aa4ff1778b318346d8ba4a7fa62c169a29410;p=linux-2.6 cs5535: check ide_config_drive_speed() return value Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz --- diff --git a/drivers/ide/pci/cs5535.c b/drivers/ide/pci/cs5535.c index 383b7eccbc..5d1be657ad 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); }