From: Ben Collins <ben.collins@ubuntu.com>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Jeff Garzik <jgarzik@pobox.com>
Cc: Linux Kernel List <linux-kernel@vger.kernel.org>,
linux-ide@vger.kernel.org
Subject: [PATCH 2.6.20-git] sata_svw: Check for errors from ata_device_add()
Date: Tue, 19 Dec 2006 17:59:13 -0500 [thread overview]
Message-ID: <1166569153.5210.116.camel@gullible> (raw)
Without this patch, G5 oopses on boot. I've had this in Ubuntu since
2.6.17, but I forgot it was in there. Still required with 2.6.20.
Signed-off-by: Ben Collins <bcollins@ubuntu.com>
diff --git a/drivers/ata/sata_svw.c b/drivers/ata/sata_svw.c
index d89c959..85911b4 100644
--- a/drivers/ata/sata_svw.c
+++ b/drivers/ata/sata_svw.c
@@ -473,11 +473,11 @@ static int k2_sata_init_one (struct pci_
pci_set_master(pdev);
- /* FIXME: check ata_device_add return value */
- ata_device_add(probe_ent);
- kfree(probe_ent);
+ if (ata_device_add(probe_ent))
+ return 0;
- return 0;
+ /* Failed to add, no device present */
+ rc = -ENODEV;
err_out_free_ent:
kfree(probe_ent);
next reply other threads:[~2006-12-19 22:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-19 22:59 Ben Collins [this message]
2006-12-19 23:33 ` [PATCH 2.6.20-git] sata_svw: Check for errors from ata_device_add() Ben Collins
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=1166569153.5210.116.camel@gullible \
--to=ben.collins@ubuntu.com \
--cc=benh@kernel.crashing.org \
--cc=jgarzik@pobox.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox