leds: lm3697: Make error handling more robust
authorAndy Shevchenko <andy.shevchenko@gmail.com>
Sat, 29 May 2021 11:19:32 +0000 (14:19 +0300)
committerPavel Machek <pavel@ucw.cz>
Tue, 3 Aug 2021 21:49:31 +0000 (23:49 +0200)
commitd299ae942e0201ce3419501f523fbaac989dd036
treed9b6fb9611f5caa7d5f0691e8e3ccb11f5fdde13
parent3a923639d36b1c54866236c2f53d112b797b0101
leds: lm3697: Make error handling more robust

It's easy to miss necessary clean up, e.g. firmware node reference counting,
during error path in ->probe(). Make it more robust by moving to a single
point of return.

Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
drivers/leds/leds-lm3697.c