mirror of
https://github.com/torvalds/linux.git
synced 2024-12-14 23:25:54 +00:00
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: Shubhrajyoti D <shubhrajyoti@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
This commit is contained in:
parent
c84d364f81
commit
df6791d704
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user