diff options
author | Yang Yingliang <yangyingliang@huawei.com> | 2022-11-22 19:12:26 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-11-29 08:56:08 +0100 |
commit | 1ab30c610630da5391a373cddb8a065bf4c4bc01 (patch) | |
tree | 4ba69616512b8f5af9159b2a013367470eeee1fe /CREDITS | |
parent | 9d1566e1f36b5167731372d2dfea97dbb4c43edf (diff) | |
download | linux-1ab30c610630da5391a373cddb8a065bf4c4bc01.tar.bz2 |
usb: roles: fix of node refcount leak in usb_role_switch_is_parent()
I got the following report while doing device(mt6370-tcpc) load
test with CONFIG_OF_UNITTEST and CONFIG_OF_DYNAMIC enabled:
OF: ERROR: memory leak, expected refcount 1 instead of 2,
of_node_get()/of_node_put() unbalanced - destroy cset entry:
attach overlay node /i2c/pmic@34
The 'parent' returned by fwnode_get_parent() with refcount incremented.
it needs be put after using.
Fixes: 6fadd72943b8 ("usb: roles: get usb-role-switch from parent")
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20221122111226.251588-1-yangyingliang@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'CREDITS')
0 files changed, 0 insertions, 0 deletions