Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 4fc3a6ae authored by Jack Pham's avatar Jack Pham
Browse files

usb: dwc3-msm: Fix invalid usb_psy access during remove



The "qcom,usb-charger" property is optional and hence may result
in the usb_psy pointer being initialized to a negative ERR_PTR
value. This leads to invalid pointer access in dwc3_msm_remove()
when calling power_supply_put() on it. Fix this by switching to
the managed variant of devm_power_supply_get_by_phandle() which
allows us to simply remove the power_supply_put() call.

Change-Id: I4fd1e46fd410fe143b1e499da1e9cf91dd53dd66
Signed-off-by: default avatarJack Pham <jackp@codeaurora.org>
parent 670949a4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment