regulator: max77802: Don't ignore return value of current opmode
authorKrzysztof Kozlowski <k.kozlowski@samsung.com>
Tue, 4 Nov 2014 08:49:43 +0000 (09:49 +0100)
committerMark Brown <broonie@kernel.org>
Tue, 4 Nov 2014 20:47:50 +0000 (20:47 +0000)
The return value of regmap_read() of current opmode for regulator was
silently ignored and whatever happened to be in 'val' variable was used
as new opmode. This could lead to using bogus opmode.

Don't ignore what regmap_read() returns. If it fails just fall back to
normal opmode.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Reviewed-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Signed-off-by: Mark Brown <broonie@kernel.org>

No differences found