From: Yulgon Kim Date: Thu, 18 Aug 2011 05:02:45 +0000 (+0900) Subject: usb: s5p-ehci: fix a NULL pointer deference X-Git-Tag: firefly_0821_release~7541^2~2854 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=b942664bf67f1f0ce021b327bd37785835e5e6b6;p=firefly-linux-kernel-4.4.55.git usb: s5p-ehci: fix a NULL pointer deference commit e5d3d4463fb30998385f9e78ab3c7f63b5813000 upstream. 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 Signed-off-by: Jingoo Han Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/host/ehci-s5p.c b/drivers/usb/host/ehci-s5p.c index e3374c8f7b3f..491a209c9d2f 100644 --- a/drivers/usb/host/ehci-s5p.c +++ b/drivers/usb/host/ehci-s5p.c @@ -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)) {