diff options
author | Aaro Koskinen <aaro.koskinen@iki.fi> | 2015-10-27 23:26:33 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-12-09 14:34:39 -0500 |
commit | dbfee9e41918f4c8adb5f27db959c81bb19567a4 (patch) | |
tree | 8771256963a6244f73b4588a511dd5027010f475 /drivers | |
parent | a0046cfd74f0d5a9556e20dc21393bf58e8bed7f (diff) | |
download | linux-stable-dbfee9e41918f4c8adb5f27db959c81bb19567a4.tar.gz linux-stable-dbfee9e41918f4c8adb5f27db959c81bb19567a4.tar.bz2 linux-stable-dbfee9e41918f4c8adb5f27db959c81bb19567a4.zip |
usb: phy: omap-otg: fix uninitialized pointer
commit 2c2025b41aeff57963f9ae2dd909fea704c625ab upstream.
otg_dev->extcon was referenced before otg_dev was initialized. Fix.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-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) 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; |