]> git.baikalelectronics.ru Git - kernel.git/commit
bus: qcom: Put child node before return
authorPan Bian <bianpan2016@163.com>
Thu, 21 Jan 2021 11:49:07 +0000 (03:49 -0800)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Tue, 30 Mar 2021 03:01:27 +0000 (22:01 -0500)
commit5258a46626edd839ff7089c2f553859a185114e7
treea4f491a3caf7930ca08a5569f837d081ba622b8e
parent45e291d5b4fd0caa0886f3092e3ceac1a07c3925
bus: qcom: Put child node before return

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: Linus Walleij <linus.walleij@linaro.org>
Fixes: 8df5df44cee9 ("bus: qcom: add EBI2 driver")
Signed-off-by: Pan Bian <bianpan2016@163.com>
Link: https://lore.kernel.org/r/20210121114907.109267-1-bianpan2016@163.com
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
drivers/bus/qcom-ebi2.c