Re: [PATCH] spmi: pmic-arb: fix return path in for_each_available_child_of_node()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Javier Carrasco (2024-10-01 05:55:52)
> This loop requires explicit calls to of_node_put() upon early exits
> (break, goto, return) to decrement the child refcounter and avoid memory
> leaks if the child is not required out of the loop.
> 
> A more robust solution is using the scoped variant of the macro, which
> automatically calls of_node_put() when the child goes out of scope.
> 
> Cc: stable@xxxxxxxxxxxxxxx
> Fixes: 979987371739 ("spmi: pmic-arb: Add multi bus support")
> Signed-off-by: Javier Carrasco <javier.carrasco.cruz@xxxxxxxxx>
> ---

Applied to spmi-next





[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux