aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/pata_platform.c
diff options
context:
space:
mode:
authorMagnus Damm <magnus.damm@gmail.com>2007-07-19 23:50:58 -0400
committerJeff Garzik <jeff@garzik.org>2007-07-20 07:16:24 -0400
commit83b6839ec33becca78ebf6035489733a62e750bb (patch)
tree949fecf150fd59b4fdc848057e22bbab20d882b6 /drivers/ata/pata_platform.c
parent0ea9e179f436f153fc19fdaef7abbc1e0da20762 (diff)
pata_platform: Fix NULL pointer dereference
pata_platform: Fix NULL pointer dereference pata_platform currently dereferences a NULL pointer in pata_platform_probe() if pdev->dev.platform_data is set to NULL. This breakage was most likely introduced by commit 5f45bc50976ee1f408f7171af155aec646655a37. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/ata/pata_platform.c')
-rw-r--r--drivers/ata/pata_platform.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/ata/pata_platform.c b/drivers/ata/pata_platform.c
index 79f841bca593..a909f793ffc1 100644
--- a/drivers/ata/pata_platform.c
+++ b/drivers/ata/pata_platform.c
@@ -213,8 +213,9 @@ static int __devinit pata_platform_probe(struct platform_device *pdev)
213 pata_platform_setup_port(&ap->ioaddr, pp_info); 213 pata_platform_setup_port(&ap->ioaddr, pp_info);
214 214
215 /* activate */ 215 /* activate */
216 return ata_host_activate(host, platform_get_irq(pdev, 0), ata_interrupt, 216 return ata_host_activate(host, platform_get_irq(pdev, 0),
217 pp_info->irq_flags, &pata_platform_sht); 217 ata_interrupt, pp_info ? pp_info->irq_flags
218 : 0, &pata_platform_sht);
218} 219}
219 220
220/** 221/**