瀏覽代碼

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>
Yulgon Kim 14 年之前
父節點
當前提交
e5d3d4463f
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      drivers/usb/host/ehci-s5p.c

+ 1 - 0
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)) {