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>
Wed, 19 May 2021 08:29:54 +0000 (10:29 +0200)
commitee0e8fdb9061e67a1dce6819072fa158618fc294
tree5e9ce29e9bd456e87b5c05dbdd4829a5abb41c93
parenta453bfd7ef15fd9d524004d3ca7b05353a302911
usb: typec: ucsi: Put fwnode in any case during ->probe()

commit b9a0866a5bdf6a4643a52872ada6be6184c6f4f2 upstream.

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