aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/pata_legacy.c4
-rw-r--r--drivers/ata/pata_qdi.c4
-rw-r--r--drivers/ata/pata_winbond.c4
3 files changed, 7 insertions, 5 deletions
diff --git a/drivers/ata/pata_legacy.c b/drivers/ata/pata_legacy.c
index c7d1738e4e69..e7bf9d89c8ee 100644
--- a/drivers/ata/pata_legacy.c
+++ b/drivers/ata/pata_legacy.c
@@ -698,8 +698,10 @@ static __init int legacy_init_one(int port, unsigned long io, unsigned long ctrl
698 goto fail_io; 698 goto fail_io;
699 699
700 pdev = platform_device_register_simple(DRV_NAME, nr_legacy_host, NULL, 0); 700 pdev = platform_device_register_simple(DRV_NAME, nr_legacy_host, NULL, 0);
701 if (pdev == NULL) 701 if (IS_ERR(pdev)) {
702 ret = PTR_ERR(pdev);
702 goto fail_dev; 703 goto fail_dev;
704 }
703 705
704 if (ht6560a & mask) { 706 if (ht6560a & mask) {
705 ops = &ht6560a_port_ops; 707 ops = &ht6560a_port_ops;
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);
diff --git a/drivers/ata/pata_winbond.c b/drivers/ata/pata_winbond.c
index 3ea345cde52e..5d1f518e1cc7 100644
--- a/drivers/ata/pata_winbond.c
+++ b/drivers/ata/pata_winbond.c
@@ -206,8 +206,8 @@ static __init int winbond_init_one(unsigned long port)
206 */ 206 */
207 207
208 pdev = platform_device_register_simple(DRV_NAME, nr_winbond_host, NULL, 0); 208 pdev = platform_device_register_simple(DRV_NAME, nr_winbond_host, NULL, 0);
209 if (pdev == NULL) 209 if (IS_ERR(pdev))
210 return -ENOMEM; 210 return PTR_ERR(pdev);
211 211
212 memset(&ae, 0, sizeof(struct ata_probe_ent)); 212 memset(&ae, 0, sizeof(struct ata_probe_ent));
213 INIT_LIST_HEAD(&ae.node); 213 INIT_LIST_HEAD(&ae.node);