linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] cs5535: check ide_config_drive_speed() return value
@ 2007-07-26 19:56 Bartlomiej Zolnierkiewicz
  2007-07-26 20:21 ` Sergei Shtylyov
  2007-07-29 10:34 ` Sergei Shtylyov
  0 siblings, 2 replies; 4+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2007-07-26 19:56 UTC (permalink / raw)
  To: linux-ide


Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
 drivers/ide/pci/cs5535.c |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

Index: b/drivers/ide/pci/cs5535.c
===================================================================
--- a/drivers/ide/pci/cs5535.c
+++ b/drivers/ide/pci/cs5535.c
@@ -141,7 +141,9 @@ static void cs5535_set_speed(ide_drive_t
  */
 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;
@@ -156,7 +158,9 @@ static int cs5535_set_drive(ide_drive_t 
  */
 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);
 }
 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-07-29 10:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-26 19:56 [PATCH] cs5535: check ide_config_drive_speed() return value Bartlomiej Zolnierkiewicz
2007-07-26 20:21 ` Sergei Shtylyov
2007-07-28 21:58   ` Bartlomiej Zolnierkiewicz
2007-07-29 10:34 ` Sergei Shtylyov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).