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>
Tue, 17 Jan 2023 16:21:44 +0000 (17:21 +0100)
commitc3194949ae8fcbe2b7e38670e7c6a5cfd2605edc
treecef880f86e9c7c3986f53d2439f06546389698be
parentccb0beb43a57ee8dbc35a3314c4bf1db922c054f
usb: typec: intel_pmc_mux: Don't leak the ACPI device reference count

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: 43d596e32276 ("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>
drivers/usb/typec/mux/intel_pmc_mux.c