Commit 83b6839e authored by Magnus Damm's avatar Magnus Damm Committed by Jeff Garzik

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 5f45bc50.
Signed-off-by: default avatarMagnus Damm <damm@igel.co.jp>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent 0ea9e179
...@@ -213,8 +213,9 @@ static int __devinit pata_platform_probe(struct platform_device *pdev) ...@@ -213,8 +213,9 @@ static int __devinit pata_platform_probe(struct platform_device *pdev)
pata_platform_setup_port(&ap->ioaddr, pp_info); pata_platform_setup_port(&ap->ioaddr, pp_info);
/* activate */ /* activate */
return ata_host_activate(host, platform_get_irq(pdev, 0), ata_interrupt, return ata_host_activate(host, platform_get_irq(pdev, 0),
pp_info->irq_flags, &pata_platform_sht); ata_interrupt, pp_info ? pp_info->irq_flags
: 0, &pata_platform_sht);
} }
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment