Patch "usb: typec: intel_pmc_mux: Put fwnode in error case during ->probe()" has been added to the 5.10-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: intel_pmc_mux: Put fwnode in error case during ->probe()

to the 5.10-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-intel_pmc_mux-put-fwnode-in-error-case-during-probe.patch
and it can be found in the queue-5.10 subdirectory.

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


>From 1a85b350a7741776a406005b943e3dec02c424ed Mon Sep 17 00:00:00 2001
From: Andy Shevchenko <andy.shevchenko@xxxxxxxxx>
Date: Mon, 7 Jun 2021 23:50:05 +0300
Subject: usb: typec: intel_pmc_mux: Put fwnode in error case during ->probe()

From: Andy Shevchenko <andy.shevchenko@xxxxxxxxx>

commit 1a85b350a7741776a406005b943e3dec02c424ed upstream.

device_get_next_child_node() bumps a reference counting of a returned variable.
We have to balance it whenever we return to the caller.

Fixes: 6701adfa9693 ("usb: typec: driver for Intel PMC mux control")
Cc: Heikki Krogerus <heikki.krogerus@xxxxxxxxxxxxxxx>
Reviewed-by: Heikki Krogerus <heikki.krogerus@xxxxxxxxxxxxxxx>
Signed-off-by: Andy Shevchenko <andy.shevchenko@xxxxxxxxx>
Cc: stable <stable@xxxxxxxxxxxxxxx>
Link: https://lore.kernel.org/r/20210607205007.71458-1-andy.shevchenko@xxxxxxxxx
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/usb/typec/mux/intel_pmc_mux.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- a/drivers/usb/typec/mux/intel_pmc_mux.c
+++ b/drivers/usb/typec/mux/intel_pmc_mux.c
@@ -623,8 +623,10 @@ static int pmc_usb_probe(struct platform
 			break;
 
 		ret = pmc_usb_register_port(pmc, i, fwnode);
-		if (ret)
+		if (ret) {
+			fwnode_handle_put(fwnode);
 			goto err_remove_ports;
+		}
 	}
 
 	platform_set_drvdata(pdev, pmc);


Patches currently in stable-queue which might be from andy.shevchenko@xxxxxxxxx are

queue-5.10/usb-typec-intel_pmc_mux-add-missed-error-check-for-devm_ioremap_resource.patch
queue-5.10/usb-typec-intel_pmc_mux-put-fwnode-in-error-case-during-probe.patch
queue-5.10/spi-don-t-have-controller-clean-up-spi-device-before.patch



[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