summaryrefslogtreecommitdiffstats
path: root/drivers/usb/otg/otg.c
diff options
context:
space:
mode:
authorShubhrajyoti D <shubhrajyoti@ti.com>2012-08-07 19:56:30 +0530
committerFelipe Balbi <balbi@ti.com>2012-08-09 14:36:58 +0300
commitdf6791d7042d839b68c58cd7dc3699f9ae5a8f22 (patch)
treebe0d62b9f3cc8686c6059a55f90df60d8ee4c808 /drivers/usb/otg/otg.c
parentc84d364f8178d2bc12827836bf58eb45598262a4 (diff)
downloadop-kernel-dev-df6791d7042d839b68c58cd7dc3699f9ae5a8f22.zip
op-kernel-dev-df6791d7042d839b68c58cd7dc3699f9ae5a8f22.tar.gz
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>
Diffstat (limited to 'drivers/usb/otg/otg.c')
-rw-r--r--drivers/usb/otg/otg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/otg/otg.c b/drivers/usb/otg/otg.c
index 1bf60a2..a30c041 100644
--- a/drivers/usb/otg/otg.c
+++ b/drivers/usb/otg/otg.c
@@ -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;
}
OpenPOWER on IntegriCloud