drivers: leds: tlc591xx: check error during device init
authorDaniel Mack <daniel@zonque.org>
Fri, 13 Sep 2019 18:07:49 +0000 (20:07 +0200)
committerPavel <pavel@ucw.cz>
Sun, 3 Nov 2019 16:37:13 +0000 (17:37 +0100)
commitb46d2b4d3d8166ab51f491a2801e2cbed2e8a7aa
tree320484770bb58580daf26fc9532d132f0db1f7eb
parentfc19967bcb8f1ab49594191ee0d352d763dc170e
drivers: leds: tlc591xx: check error during device init

The driver currently ignores errors from register writes at probe time.
It will hence register an LED class device no matter whether the
pyhsical device is present or not.

To fix this, make the device probe fail in case regmap operations
return an error.

Signed-off-by: Daniel Mack <daniel@zonque.org>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
drivers/leds/leds-tlc591xx.c