提交 bbcd85a0 编写于 作者: V Vivek Gautam 提交者: Greg Kroah-Hartman

usb: ehci-s5p: fix: Fix null pointer dereferencing

7edb3daf: (USB: EHCI: make ehci-s5p a separate driver)
raised an issue with ehci-s5p's driver data.
Now that 's5p_ehci_hcd' doesn't maintain pointer to 'usb_hcd'
and s5p_ehci is nothing but a pointer to hcd->priv;
add hcd to the driver data rather than s5p_ehci.

This fixes issues with null pointer dereferencing in
s5p_ehci_shutdown(), s5p_ehci_suspend(), s5p_ehci_resume().
Signed-off-by: NVivek Gautam <gautam.vivek@samsung.com>
CC: Manjunath Goudar <manjunath.goudar@linaro.org>
CC: Arnd Bergmann <arnd@arndb.de>
CC: Jingoo Han <jg1.han@samsung.com>
Acked-by: NArnd Bergmann <arnd@arndb.de>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 e5ab9f18
......@@ -173,7 +173,7 @@ static int s5p_ehci_probe(struct platform_device *pdev)
goto fail_add_hcd;
}
platform_set_drvdata(pdev, s5p_ehci);
platform_set_drvdata(pdev, hcd);
return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册