Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=83b6839ec33becca78ebf6035489733a62e750bb
Commit:     83b6839ec33becca78ebf6035489733a62e750bb
Parent:     0ea9e179f436f153fc19fdaef7abbc1e0da20762
Author:     Magnus Damm <[EMAIL PROTECTED]>
AuthorDate: Fri Jul 20 12:50:58 2007 +0900
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Fri Jul 20 07:16:24 2007 -0400

    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 <[EMAIL PROTECTED]>
    Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 drivers/ata/pata_platform.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/ata/pata_platform.c b/drivers/ata/pata_platform.c
index 79f841b..a909f79 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)
        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 git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to