leds: lm3692x: Handle failure to probe the regulator
authorGuido Günther <agx@sigxcpu.org>
Sat, 21 Sep 2019 21:12:10 +0000 (14:12 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 4 Jan 2020 18:17:02 +0000 (19:17 +0100)
commitaf4eac2a2871a97f6284f816930ab612bbd6c01c
tree964ce16554464e4c9e41f0a91b49fcac2f70ac07
parent37958001e11d592114c3e02e296065c670803ced
leds: lm3692x: Handle failure to probe the regulator

[ Upstream commit 396128d2ffcba6e1954cfdc9a89293ff79cbfd7c ]

Instead use devm_regulator_get_optional since the regulator
is optional and check for errors.

Signed-off-by: Guido Günther <agx@sigxcpu.org>
Acked-by: Pavel Machek <pavel@ucw.cz>
Reviewed-by: Dan Murphy <dmurphy@ti.com>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/leds/leds-lm3692x.c