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:12:43 +0000 (19:12 +0100)
commita072f0ab35d213e4471a6c93e61d0b4a1b46dc05
tree17ec078cb25d2ce22577a3e169058ae674d822ca
parentea44828c4106ec6acb441474f1a99ac5d3911efe
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