Searched hist:"85 b3e780a7ef93d2c49b867945f60c83a42a8de7" (Results 1 – 1 of 1) sorted by relevance
| /rk3399_rockchip-uboot/drivers/usb/host/ |
| H A D | ehci-hcd.c | 85b3e780a7ef93d2c49b867945f60c83a42a8de7 Mon Nov 20 18:33:39 UTC 2017 Heinrich Schuchardt <xypron.glpk@gmx.de> UPSTREAM: dm: usb: ehci: avoid possible NULL dereference
Currently we check in ehci_shutdown() if ctrl is NULL after dereferencing it.
Before this we have already dereferenced ctrl, ctrl->hccr, and ctrl->hcor in ehci_get_portsc_register(), ehci_submit_root(), and hci_common_init().
A better approach is to already check ctrl, ctrl->hccr, and ctrl->hcor during the initialization in ehci_register() and usb_lowlevel_init() and signal an error here via the return code.
Change-Id: I940999cbb94fbae4642fd25df820997c4d642da1 Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Kever Yang <kever.yang@rock-chips.com> (cherry picked from commit 45157d27644c23493ea1b5a6c9dd67572eb75c8c)
|