usb: pd: Assign regulator pointer to NULL if get error code
In the case we get error code from devm_regulator_get() instead
of regulator pointer, pd->vbus will be assigned to error code.
We need to assign NULL to pd->vbus after checking the return
value.
Change-Id: Ibcbdf75b8aa05db5148ed138fb15e60ab60a0182
Signed-off-by:
Liangliang Lu <luliang@codeaurora.org>
Loading
Please register or sign in to comment