]> git.baikalelectronics.ru Git - kernel.git/commit
usb: typec: intel_pmc_mux: Don't leak the ACPI device reference count
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 2 Jan 2023 20:29:32 +0000 (22:29 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Mar 2023 08:33:31 +0000 (09:33 +0100)
commit596e16e71d847e2cb2286422700b1baa74d7a8a2
tree6387b88f5618612ed43ed2496ffbce7f6c528556
parent8a0ae4274ba5f6d855c68eb41f6577a1f58ca84c
usb: typec: intel_pmc_mux: Don't leak the ACPI device reference count

[ Upstream commit 6d64b4d5b6be3670982e100e6e007f7888d974d4 ]

When acpi_dev_get_memory_resources() fails, the reference count is
left bumped. Drop it as it's done in the other error paths.

Fixes: dc42a35a5125 ("usb: typec: intel_pmc_mux: Check the port status before connect")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20230102202933.15968-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/usb/typec/mux/intel_pmc_mux.c