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

Commit df6791d7 authored by Shubhrajyoti D's avatar Shubhrajyoti D Committed by Felipe Balbi
Browse files

usb: otg: Remove the unneeded NULL check



The function usb_add_phy trusts the sanity of the caller.
Also it accesses x after the NULL check.
Remove the unneeded check.

Signed-off-by: default avatarShubhrajyoti D <shubhrajyoti@ti.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent c84d364f
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -159,7 +159,7 @@ int usb_add_phy(struct usb_phy *x, enum usb_phy_type type)
	unsigned long	flags;
	unsigned long	flags;
	struct usb_phy	*phy;
	struct usb_phy	*phy;


	if (x && x->type != USB_PHY_TYPE_UNDEFINED) {
	if (x->type != USB_PHY_TYPE_UNDEFINED) {
		dev_err(x->dev, "not accepting initialized PHY %s\n", x->label);
		dev_err(x->dev, "not accepting initialized PHY %s\n", x->label);
		return -EINVAL;
		return -EINVAL;
	}
	}