projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c84d364
)
usb: otg: Remove the unneeded NULL check
author
Shubhrajyoti D
<shubhrajyoti@ti.com>
Tue, 7 Aug 2012 14:26:30 +0000
(19:56 +0530)
committer
Felipe Balbi
<balbi@ti.com>
Thu, 9 Aug 2012 11:36:58 +0000
(14:36 +0300)
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>
drivers/usb/otg/otg.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/usb/otg/otg.c
b/drivers/usb/otg/otg.c
index 1bf60a22595c706c2213720b1514391002e6284b..a30c04115115046e9c1c43e4e1bbced59b73e441 100644
(file)
--- 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;
}