Skip to content

Commit

Permalink
cs5535: check ide_config_drive_speed() return value
Browse files Browse the repository at this point in the history
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Oct 13, 2007
1 parent 3b4024d commit 249aa4f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions drivers/ide/pci/cs5535.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
}

Expand Down

0 comments on commit 249aa4f

Please sign in to comment.