All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: linux-ide@vger.kernel.org
Subject: [PATCH] cs5535: check ide_config_drive_speed() return value
Date: Thu, 26 Jul 2007 21:56:31 +0200	[thread overview]
Message-ID: <200707262156.31586.bzolnier@gmail.com> (raw)


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);
 }
 

             reply	other threads:[~2007-07-26 19:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-26 19:56 Bartlomiej Zolnierkiewicz [this message]
2007-07-26 20:21 ` [PATCH] cs5535: check ide_config_drive_speed() return value Sergei Shtylyov
2007-07-28 21:58   ` Bartlomiej Zolnierkiewicz
2007-07-29 10:34 ` Sergei Shtylyov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200707262156.31586.bzolnier@gmail.com \
    --to=bzolnier@gmail.com \
    --cc=linux-ide@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.