aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorYulgon Kim <yulgon.kim@samsung.com>2011-08-18 01:02:45 -0400
committerHerton Ronaldo Krzesinski <herton.krzesinski@canonical.com>2011-10-17 13:32:24 -0400
commit5847e88f102bea0bb10b221edbf2d13738b4eba4 (patch)
tree092e1ee793dcabe6d3082d996ab965ce23de047d /drivers/usb
parent2209460acb32180f2c81741a47a66092eb634891 (diff)
usb: s5p-ehci: fix a NULL pointer deference
BugLink: http://bugs.launchpad.net/bugs/868628 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 <yulgon.kim@samsung.com> Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-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 e3374c8f7b3..491a209c9d2 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)
86 goto fail_hcd; 86 goto fail_hcd;
87 } 87 }
88 88
89 s5p_ehci->hcd = hcd;
89 s5p_ehci->clk = clk_get(&pdev->dev, "usbhost"); 90 s5p_ehci->clk = clk_get(&pdev->dev, "usbhost");
90 91
91 if (IS_ERR(s5p_ehci->clk)) { 92 if (IS_ERR(s5p_ehci->clk)) {