Skip to contentSkip to conversation

patch "usb: phy: omap-otg: fix uninitialized pointer" added to usb-linus

PATCH [email protected] 1 participant 1 message Nov 17, 2015

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

usb: phy: omap-otg: fix uninitialized pointer

to my usb git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
in the usb-linus branch.

The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)

The patch will hopefully also be merged in Linus's tree for the next -rc kernel release.

If you have any questions about this process, please let me know.

Quoted 1 line

From 2c2025b41aeff57963f9ae2dd909fea704c625ab Mon Sep 17 00:00:00 2001

From: Aaro Koskinen <[email protected]>
Date: Tue, 27 Oct 2015 23:26:33 +0200
Subject: usb: phy: omap-otg: fix uninitialized pointer

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")
---
 drivers/usb/phy/phy-omap-otg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/phy/phy-omap-otg.c +1 -1
index 1270906ccb95..c4bf2de6d14e 100644
@@ -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;
 
Signature · 1 line
2.6.2