[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1166569153.5210.116.camel@gullible>
Date: Tue, 19 Dec 2006 17:59:13 -0500
From: Ben Collins <ben.collins@...ntu.com>
To: Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Jeff Garzik <jgarzik@...ox.com>
Cc: Linux Kernel List <linux-kernel@...r.kernel.org>,
linux-ide@...r.kernel.org
Subject: [PATCH 2.6.20-git] sata_svw: Check for errors from ata_device_add()
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@...ntu.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);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists