Re: [PATCH] regulator: add missing call to of_node_put()

2021-02-25 Thread kernel test robot
Hi Yang, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on regulator/for-next] [also build test WARNING on v5.11 next-20210225] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as

Re: [PATCH] regulator: add missing call to of_node_put()

2021-02-25 Thread kernel test robot
Hi Yang, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on regulator/for-next] [also build test WARNING on v5.11 next-20210225] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as

Re: [PATCH] regulator: add missing call to of_node_put()

2021-02-25 Thread Cristian Marussi
Hi, thanks for reporting this, you're right but you've missed the braces around the if block in your patch, because we really want to exit only on -ENOMEM. Something like: if (ret == -ENOMEM) { of_node_put(child); return ret; } Regards, Cristian

[PATCH] regulator: add missing call to of_node_put()

2021-02-25 Thread Yang Li
In one of the error paths of the for_each_child_of_node() loop, add missing call to of_node_put(). Fix the following coccicheck warning: ./drivers/regulator/scmi-regulator.c:343:1-23: WARNING: Function "for_each_child_of_node" should have of_node_put() before return around line 347. Reported-by: