Skip to contentSkip to conversation

Patch "usb: phy: tahvo: fix error handling in tahvo_usb_probe()" has been added to the 4.4-stable tree

PATCH [email protected] 1 participant 1 message Dec 6, 2017

Subsystems (2)
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: tahvo: fix error handling in tahvo_usb_probe()

to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
usb-phy-tahvo-fix-error-handling-in-tahvo_usb_probe.patch
and it can be found in the queue-4.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From foo@baz Wed Dec 6 16:43:17 CET 2017

From: Alexey Khoroshilov <[email protected]>
Date: Sat, 21 Oct 2017 01:02:07 +0300
Subject: usb: phy: tahvo: fix error handling in tahvo_usb_probe()

From: Alexey Khoroshilov <[email protected]>

[ Upstream commit ce035409bfa892a2fabb89720b542e1b335c3426 ]

If devm_extcon_dev_allocate() fails, we should disable clk before return.

Found by Linux Driver Verification project (linuxtesting.org).

Fixes 860d2686fda7 ("usb: phy: tahvo: Use devm_extcon_dev_[allocate|register]() and replace deprecated API")
---
 drivers/usb/phy/phy-tahvo.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/usb/phy/phy-tahvo.c +2 -1
@@ -368,7 +368,8 @@ static int tahvo_usb_probe(struct platfo
 	tu->extcon = devm_extcon_dev_allocate(&pdev->dev, tahvo_cable);
 	if (IS_ERR(tu->extcon)) {
 		dev_err(&pdev->dev, "failed to allocate memory for extcon\n");
-		return -ENOMEM;
+		ret = PTR_ERR(tu->extcon);
+		goto err_disable_clk;
 	}
 
 	ret = devm_extcon_dev_register(&pdev->dev, tu->extcon);

Patches currently in stable-queue which might be from [email protected] are

queue-4.4/usb-phy-tahvo-fix-error-handling-in-tahvo_usb_probe.patch