All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <htejun@gmail.com>
To: jgarzik@pobox.com, alan@lxorguk.ukuu.org.uk, axboe@suse.de,
	albertcc@tw.ibm.com, lkosewsk@gmail.com,
	linux-ide@vger.kernel.org
Cc: Tejun Heo <htejun@gmail.com>
Subject: [PATCH 2/3] libata: cosmetic update to ata_bus_probe()
Date: Tue, 11 Apr 2006 22:26:29 +0900	[thread overview]
Message-ID: <11447619893595-git-send-email-htejun@gmail.com> (raw)
In-Reply-To: <11447619891579-git-send-email-htejun@gmail.com>

Move ata_set_mode() failure handling outside of ap->ops->set_mode if
clause such that it can handle ap->ops->set_mode failures after it's
updated.

Signed-off-by: Tejun Heo <htejun@gmail.com>

---

 drivers/scsi/libata-core.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

8ed14e7229110cf9e338ba866fdca78373d1215d
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
index e42a8f3..f1abe75 100644
--- a/drivers/scsi/libata-core.c
+++ b/drivers/scsi/libata-core.c
@@ -1441,12 +1441,12 @@ static int ata_bus_probe(struct ata_port
 				break;
 			}
 		rc = 0;
-	} else {
+	} else
 		rc = ata_set_mode(ap, &dev);
-		if (rc) {
-			down_xfermask = 1;
-			goto fail;
-		}
+
+	if (rc) {
+		down_xfermask = 1;
+		goto fail;
 	}
 
 	for (i = 0; i < ATA_MAX_DEVICES; i++)
-- 
1.2.4



  parent reply	other threads:[~2006-04-11 13:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-11 13:26 [PATCHSET 3/9] misc ata_bus_probe() updates Tejun Heo
2006-04-11 13:26 ` [PATCH 3/3] libata: prefix sata register print outs with 0x Tejun Heo
2006-04-11 17:24   ` Jeff Garzik
2006-04-12  1:20     ` Tejun Heo
2006-04-11 13:26 ` Tejun Heo [this message]
2006-04-11 13:26 ` [PATCH 1/3] libata: disable failed devices only once in ata_bus_probe() Tejun Heo
2006-04-11 17:22   ` Jeff Garzik

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=11447619893595-git-send-email-htejun@gmail.com \
    --to=htejun@gmail.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=albertcc@tw.ibm.com \
    --cc=axboe@suse.de \
    --cc=jgarzik@pobox.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=lkosewsk@gmail.com \
    /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.