Patch "usb: typec: tipd: Cleanup resources if devm_tps6598_psy_register fails" has been added to the 6.0-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

    usb: typec: tipd: Cleanup resources if devm_tps6598_psy_register fails

to the 6.0-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-typec-tipd-cleanup-resources-if-devm_tps6598_psy.patch
and it can be found in the queue-6.0 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 3e3a359113c7d6eab4552489652007d8de4118d0
Author: Sven Peter <sven@xxxxxxxxxxxxx>
Date:   Mon Nov 14 18:44:46 2022 +0100

    usb: typec: tipd: Cleanup resources if devm_tps6598_psy_register fails
    
    [ Upstream commit 19c220e9ab00f50edefb9667e3101e84a5112df2 ]
    
    We can't just return if devm_tps6598_psy_register fails since previous
    resources are not devres managed and have yet to be cleaned up.
    
    Fixes: 10eb0b6ac63a ("usb: typec: tps6598x: Export some power supply properties")
    Signed-off-by: Sven Peter <sven@xxxxxxxxxxxxx>
    Reviewed-by: Heikki Krogerus <heikki.krogerus@xxxxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20221114174449.34634-1-sven@xxxxxxxxxxxxx
    Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/usb/typec/tipd/core.c b/drivers/usb/typec/tipd/core.c
index 92e35e62e78c..28dd5c3b175b 100644
--- a/drivers/usb/typec/tipd/core.c
+++ b/drivers/usb/typec/tipd/core.c
@@ -814,7 +814,7 @@ static int tps6598x_probe(struct i2c_client *client)
 
 	ret = devm_tps6598_psy_register(tps);
 	if (ret)
-		return ret;
+		goto err_role_put;
 
 	tps->port = typec_register_port(&client->dev, &typec_cap);
 	if (IS_ERR(tps->port)) {



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux