leds: el15203000: Make error handling more robust
authorAndy Shevchenko <andy.shevchenko@gmail.com>
Mon, 10 May 2021 09:50:21 +0000 (12:50 +0300)
committerPavel Machek <pavel@ucw.cz>
Fri, 28 May 2021 10:05:29 +0000 (12:05 +0200)
commite1012160bbbca92d67c729f68108734b7d679db9
treea264f8b9b6a758fd54dcdb656c1a210730648b37
parent95138e01275e1af3f1fc2780fe1d9c6138b29c7a
leds: el15203000: 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-el15203000.c