summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYulgon Kim <yulgon.kim@samsung.com>2011-08-18 07:02:45 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2011-08-22 22:38:52 +0200
commite5d3d4463fb30998385f9e78ab3c7f63b5813000 (patch)
tree82f36998273b460a036f1c32982e6216a4a05e54
parentUSB: EHCI: Do not rely on PORT_SUSPEND to stop USB resuming in ehci_bus_resum... (diff)
downloadlinux-e5d3d4463fb30998385f9e78ab3c7f63b5813000.tar.xz
linux-e5d3d4463fb30998385f9e78ab3c7f63b5813000.zip
usb: s5p-ehci: fix a NULL pointer deference
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>
-rw-r--r--drivers/usb/host/ehci-s5p.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/host/ehci-s5p.c b/drivers/usb/host/ehci-s5p.c
index b3958b3d3163..9e77f1c8bdbd 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)) {