projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
705e63d
)
usb: phy: omap-otg: fix uninitialized pointer
author
Aaro Koskinen
<
[email protected]
>
Tue, 27 Oct 2015 21:26:33 +0000
(23:26 +0200)
committer
Felipe Balbi
<
[email protected]
>
Mon, 16 Nov 2015 16:17:40 +0000
(10:17 -0600)
otg_dev->extcon was referenced before otg_dev was initialized. Fix.
Cc: <
[email protected]
> # v4.3
Fixes: a2fd2423240f ("usb: phy: omap-otg: Replace deprecated API of extcon")
Reviewed-by: Chanwoo Choi <
[email protected]
>
Signed-off-by: Aaro Koskinen <
[email protected]
>
Signed-off-by: Felipe Balbi <
[email protected]
>
drivers/usb/phy/phy-omap-otg.c
patch
|
blob
|
history
diff --git
a/drivers/usb/phy/phy-omap-otg.c
b/drivers/usb/phy/phy-omap-otg.c
index 1270906ccb95808714d174f0461a081c8d1d1cc6..c4bf2de6d14ec3a47259f06977e27ea1f3329ed1 100644
(file)
--- a/
drivers/usb/phy/phy-omap-otg.c
+++ b/
drivers/usb/phy/phy-omap-otg.c
@@
-105,7
+105,6
@@
static int omap_otg_probe(struct platform_device *pdev)
extcon = extcon_get_extcon_dev(config->extcon);
if (!extcon)
return -EPROBE_DEFER;
- otg_dev->extcon = extcon;
otg_dev = devm_kzalloc(&pdev->dev, sizeof(*otg_dev), GFP_KERNEL);
if (!otg_dev)
@@
-115,6
+114,7
@@
static int omap_otg_probe(struct platform_device *pdev)
if (IS_ERR(otg_dev->base))
return PTR_ERR(otg_dev->base);
+ otg_dev->extcon = extcon;
otg_dev->id_nb.notifier_call = omap_otg_id_notifier;
otg_dev->vbus_nb.notifier_call = omap_otg_vbus_notifier;