Skip to content

Commit

Permalink
usb: s5p-ehci: fix a NULL pointer deference
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Yulgon Kim authored and Greg Kroah-Hartman committed Aug 22, 2011
1 parent d0f2fb2 commit e5d3d44
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/usb/host/ehci-s5p.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit e5d3d44

Please sign in to comment.