]> git.karo-electronics.de Git - linux-beck.git/commitdiff
usb: s5p-ehci: fix a NULL pointer deference
authorYulgon Kim <yulgon.kim@samsung.com>
Thu, 18 Aug 2011 05:02:45 +0000 (14:02 +0900)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 22 Aug 2011 20:38:52 +0000 (13:38 -0700)
This patch fixes a NULL pointer deference. A NULL pointer
dereference happens since s5p_ehci->hcd field is not initialized
yet in probe function.

[jg1.han@samsung.com: edit commit message]
Signed-off-by: Yulgon Kim <yulgon.kim@samsung.com>
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/host/ehci-s5p.c

index b3958b3d31634f59c9c067712c7f4cf7c2959c0a..9e77f1c8bdbdc1d62e31565f9c8303e292f8026f 100644 (file)
@@ -86,6 +86,7 @@ static int __devinit s5p_ehci_probe(struct platform_device *pdev)
                goto fail_hcd;
        }
 
+       s5p_ehci->hcd = hcd;
        s5p_ehci->clk = clk_get(&pdev->dev, "usbhost");
 
        if (IS_ERR(s5p_ehci->clk)) {