aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/pata_qdi.c
diff options
context:
space:
mode:
authorAkinobu Mita <akinobu.mita@gmail.com>2006-12-15 16:08:51 -0500
committerJeff Garzik <jeff@garzik.org>2006-12-16 10:45:28 -0500
commit9825d73ceb6cad9b9c2ee2dc2971b58dbe8623cd (patch)
treed93e3349ee07705776addd62e4ec97d83a654ac8 /drivers/ata/pata_qdi.c
parent551c012d7eea3dc5ec063c7ff9c718d39e77634f (diff)
[PATCH] ata: fix platform_device_register_simple() error check
The return value of platform_device_register_simple() should be checked by IS_ERR(). Cc: Jeff Garzik <jgarzik@pobox.com> Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/ata/pata_qdi.c')
-rw-r--r--drivers/ata/pata_qdi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/ata/pata_qdi.c b/drivers/ata/pata_qdi.c
index 36f621abc390..afc0d990e7d6 100644
--- a/drivers/ata/pata_qdi.c
+++ b/drivers/ata/pata_qdi.c
@@ -247,8 +247,8 @@ static __init int qdi_init_one(unsigned long port, int type, unsigned long io, i
247 */ 247 */
248 248
249 pdev = platform_device_register_simple(DRV_NAME, nr_qdi_host, NULL, 0); 249 pdev = platform_device_register_simple(DRV_NAME, nr_qdi_host, NULL, 0);
250 if (pdev == NULL) 250 if (IS_ERR(pdev))
251 return -ENOMEM; 251 return PTR_ERR(pdev);
252 252
253 memset(&ae, 0, sizeof(struct ata_probe_ent)); 253 memset(&ae, 0, sizeof(struct ata_probe_ent));
254 INIT_LIST_HEAD(&ae.node); 254 INIT_LIST_HEAD(&ae.node);