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>
pata_platform_setup_port(&ap->ioaddr, pp_info);
/* activate */
- return ata_host_activate(host, platform_get_irq(pdev, 0), ata_interrupt,
- pp_info->irq_flags, &pata_platform_sht);
+ return ata_host_activate(host, platform_get_irq(pdev, 0),
+ ata_interrupt, pp_info ? pp_info->irq_flags
+ : 0, &pata_platform_sht);
}
/**