diff options
author | Aaro Koskinen <aaro.koskinen@iki.fi> | 2015-10-27 17:26:33 -0400 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2015-11-16 11:17:40 -0500 |
commit | 2c2025b41aeff57963f9ae2dd909fea704c625ab (patch) | |
tree | 5404703d8005cffcc683d8a2171ecec40fe0dad6 | |
parent | 705e63d2b29c8bbf091119084544d353bda70393 (diff) |
usb: phy: omap-otg: fix uninitialized pointer
otg_dev->extcon was referenced before otg_dev was initialized. Fix.
Cc: <stable@vger.kernel.org> # v4.3
Fixes: a2fd2423240f ("usb: phy: omap-otg: Replace deprecated API of extcon")
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Felipe Balbi <balbi@ti.com>
-rw-r--r-- | drivers/usb/phy/phy-omap-otg.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/phy/phy-omap-otg.c b/drivers/usb/phy/phy-omap-otg.c index 1270906ccb95..c4bf2de6d14e 100644 --- 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) | |||
105 | extcon = extcon_get_extcon_dev(config->extcon); | 105 | extcon = extcon_get_extcon_dev(config->extcon); |
106 | if (!extcon) | 106 | if (!extcon) |
107 | return -EPROBE_DEFER; | 107 | return -EPROBE_DEFER; |
108 | otg_dev->extcon = extcon; | ||
109 | 108 | ||
110 | otg_dev = devm_kzalloc(&pdev->dev, sizeof(*otg_dev), GFP_KERNEL); | 109 | otg_dev = devm_kzalloc(&pdev->dev, sizeof(*otg_dev), GFP_KERNEL); |
111 | if (!otg_dev) | 110 | if (!otg_dev) |
@@ -115,6 +114,7 @@ static int omap_otg_probe(struct platform_device *pdev) | |||
115 | if (IS_ERR(otg_dev->base)) | 114 | if (IS_ERR(otg_dev->base)) |
116 | return PTR_ERR(otg_dev->base); | 115 | return PTR_ERR(otg_dev->base); |
117 | 116 | ||
117 | otg_dev->extcon = extcon; | ||
118 | otg_dev->id_nb.notifier_call = omap_otg_id_notifier; | 118 | otg_dev->id_nb.notifier_call = omap_otg_id_notifier; |
119 | otg_dev->vbus_nb.notifier_call = omap_otg_vbus_notifier; | 119 | otg_dev->vbus_nb.notifier_call = omap_otg_vbus_notifier; |
120 | 120 | ||