Commit b422023c authored by Pan Bian's avatar Pan Bian Committed by Zhang Xiaoxu
Browse files

bus: qcom: Put child node before return

mainline inclusion
from mainline-v5.13-rc1
commit ac6ad7c2
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/I94VOR


CVE: CVE-2021-47054

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

Put child node before return to fix potential reference count leak.
Generally, the reference count of child is incremented and decremented
automatically in the macro for_each_available_child_of_node() and should
be decremented manually if the loop is broken in loop body.

Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Fixes: 335a1275 ("bus: qcom: add EBI2 driver")
Signed-off-by: default avatarPan Bian <bianpan2016@163.com>
Link: https://lore.kernel.org/r/20210121114907.109267-1-bianpan2016@163.com


Signed-off-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: default avatarZhang Xiaoxu <zhangxiaoxu5@huawei.com>
parent c4c847f5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment