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

Commit 8925c2e2 authored by Jack Pham's avatar Jack Pham
Browse files

usb: phy: check for NULL before calling set_params



Make sure to not dereference NULL parameter.

Change-Id: I79440c95f10e21330c56d6952ba21ae77cef2dae
Signed-off-by: default avatarJack Pham <jackp@codeaurora.org>
parent 4a641e4d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -196,7 +196,7 @@ usb_phy_vbus_off(struct usb_phy *x)
static inline int
usb_phy_set_params(struct usb_phy *x)
{
	if (x->set_params)
	if (x && x->set_params)
		return x->set_params(x);

	return 0;