Files
linux/drivers
Yang Yingliang 82d1211f67 usb: typec: wusb3801: fix fwnode refcount leak in wusb3801_probe()
[ Upstream commit dc18a4c7b3 ]

I got the following report while doing fault injection test:

  OF: ERROR: memory leak, expected refcount 1 instead of 4,
  of_node_get()/of_node_put() unbalanced - destroy cset entry:
  attach overlay node /i2c/tcpc@60/connector

If wusb3801_hw_init() fails, fwnode_handle_put() needs be called to
avoid refcount leak.

Fixes: d016cbe4d7 ("usb: typec: Support the WUSB3801 port controller")
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20221203071027.3808308-1-yangyingliang@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-12-31 13:32:42 +01:00
..
2022-12-31 13:32:02 +01:00
2022-11-04 16:03:43 -07:00
2022-09-21 20:33:49 +02:00
2022-12-31 13:32:25 +01:00
2022-12-31 13:32:09 +01:00