Messages in this thread | | | Subject | Re: [PATCH 5/7] regulator: plug of_node leak in regulator_register()'s error path | From | Vladimir Zapolskiy <> | Date | Tue, 11 Aug 2020 09:15:07 +0300 |
| |
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: stable@vger.kernel.org > Fixes: 9177514ce349 ("regulator: fix memory leak on error path of regulator_register()") > Signed-off-by: Michał Mirosław <mirq-linux@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 <vz@mleia.com>
-- Best wishes, Vladimir
| |