Home
last modified time | relevance | path

Searched hist:b0bf77cd (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/drivers/usb/dwc3/
H A Dcore.cb0bf77cd Wed Mar 03 03:58:26 CST 2021 Colin Ian King <colin.king@canonical.com> usb: dwc3: Fix dereferencing of null dwc->usb_psy

Currently the null check logic on dwc->usb_psy is inverted as it allows
calls to power_supply_put with a null dwc->usb_psy causing a null
pointer dereference. Fix this by removing the ! operator.

Addresses-Coverity: ("Dereference after null check")
Fixes: 59fa3def35de ("usb: dwc3: add a power supply for current control")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20210303095826.6143-1-colin.king@canonical.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>