diff options
Diffstat (limited to 'drivers/ide/pci/cs5535.c')
-rw-r--r-- | drivers/ide/pci/cs5535.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/ide/pci/cs5535.c b/drivers/ide/pci/cs5535.c index 383b7eccbcbb..5d1be657adca 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) | |||
141 | */ | 141 | */ |
142 | static int cs5535_set_drive(ide_drive_t *drive, u8 speed) | 142 | static int cs5535_set_drive(ide_drive_t *drive, u8 speed) |
143 | { | 143 | { |
144 | ide_config_drive_speed(drive, speed); | 144 | if (ide_config_drive_speed(drive, speed)) |
145 | return 1; | ||
146 | |||
145 | cs5535_set_speed(drive, speed); | 147 | cs5535_set_speed(drive, speed); |
146 | 148 | ||
147 | return 0; | 149 | return 0; |
@@ -157,7 +159,9 @@ static int cs5535_set_drive(ide_drive_t *drive, u8 speed) | |||
157 | 159 | ||
158 | static void cs5535_set_pio_mode(ide_drive_t *drive, const u8 pio) | 160 | static void cs5535_set_pio_mode(ide_drive_t *drive, const u8 pio) |
159 | { | 161 | { |
160 | ide_config_drive_speed(drive, XFER_PIO_0 + pio); | 162 | if (ide_config_drive_speed(drive, XFER_PIO_0 + pio)) |
163 | return; | ||
164 | |||
161 | cs5535_set_speed(drive, XFER_PIO_0 + pio); | 165 | cs5535_set_speed(drive, XFER_PIO_0 + pio); |
162 | } | 166 | } |
163 | 167 | ||