usb: typec: ucsi: Put fwnode in any case during ->probe()
authorAndy Shevchenko <andy.shevchenko@gmail.com>
Tue, 4 May 2021 22:23:37 +0000 (01:23 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 10 May 2021 13:02:13 +0000 (15:02 +0200)
commitb9a0866a5bdf6a4643a52872ada6be6184c6f4f2
treed6da2982ec189425923aff6e3d88158018d22777
parent2e2b8d15adc2f6ab2d4aa0550e241b9742a436a0
usb: typec: ucsi: Put fwnode in any case during ->probe()

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

Fixes: c1b0bc2dabfa ("usb: typec: Add support for UCSI interface")
Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20210504222337.3151726-1-andy.shevchenko@gmail.com
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/ucsi/ucsi.c