ion: msm: Correct OF node refcount handling in error paths
The for_each_[available]_child_of_node iterators implicitly
increment the reference count on the current OF node at the
start of the iteration, and decrements it at the end of the
iteration.
However, if the control flow is such that the loop
can be broken out of prior to finishing an iteration, then
the reference count must be decremented in the subsequent
code path.
Thus, fix the error path in the MSM ION code to decrement the
reference on the current OF node when prematurely exiting
an of_node loop.
Change-Id: I5c2ec02a57eff416c04b1fe63c80d6e573a692d4
Signed-off-by:
Isaac J. Manjarres <isaacm@codeaurora.org>
Loading
Please register or sign in to comment