pata_platform: Fix NULL pointer dereference
The platform-specific structures may leave pdev->dev.platform_data as NULL.
Signed-off-by: Magnus Damm <[EMAIL PROTECTED]>
---
Tested on a Solution Engline 7722
Applies to git linux-2.6 a5fcaa210626a79465321e344c91a6a7dc3881fa
drivers/ata/pata_platform.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
--- 0001/drivers/ata/pata_platform.c
+++ work/drivers/ata/pata_platform.c 2007-07-17 15:01:09.000000000 +0900
@@ -213,8 +213,9 @@ static int __devinit pata_platform_probe
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);
}
/**
-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html