Hi Michał,

On 8/11/20 4:07 AM, Michał Mirosław wrote:
> By calling device_initialize() earlier and noting that kfree(NULL) is
> ok, we can save a bit of code in error handling and plug of_node leak.
> Fixed commit already did part of the work.
> 
> Cc: sta...@vger.kernel.org
> Fixes: 9177514ce349 ("regulator: fix memory leak on error path of 
> regulator_register()")
> Signed-off-by: Michał Mirosław <mirq-li...@rere.qmqm.pl>

thank you for the patch!

I was worried about a potentially remaining of_node reference leak,
but I was not able to reproduce it on practice without code fuzzing.

The change looks valid and it's a nice simplification.

Acked-by: Vladimir Zapolskiy <v...@mleia.com>

--
Best wishes,
Vladimir

Reply via email to