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

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
......@@ -159,7 +159,7 @@ int usb_add_phy(struct usb_phy *x, enum usb_phy_type type)
unsigned long flags;
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);
return -EINVAL;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment