Commit cd2e28ec authored by Liang He's avatar Liang He Committed by Zheng Zengkai
Browse files

i2c: mux-gpmux: Add of_node_put() when breaking out of loop

stable inclusion
from stable-v5.10.137
commit c040a02e4c2172a9f482ea8509a5222bb4ecadf4
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I60PLB

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=c040a02e4c2172a9f482ea8509a5222bb4ecadf4



--------------------------------

[ Upstream commit 6435319c ]

In i2c_mux_probe(), we should call of_node_put() when breaking out
of for_each_child_of_node() which will automatically increase and
decrease the refcount.

Fixes: ac8498f0 ("i2c: i2c-mux-gpmux: new driver")
Signed-off-by: default avatarLiang He <windhl@126.com>
Acked-by: default avatarPeter Rosin <peda@axentia.se>
Signed-off-by: default avatarWolfram Sang <wsa@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
Reviewed-by: default avatarWei Li <liwei391@huawei.com>
parent 0f998ee9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment