mfd: arizona: Add sensible return value to some error paths
authorCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
Wed, 31 Aug 2016 09:41:30 +0000 (10:41 +0100)
committerLee Jones <lee.jones@linaro.org>
Tue, 4 Oct 2016 14:48:02 +0000 (15:48 +0100)
commit75d8a2b041f24ee5cb8b701c2cc62826b65dfb8c
treedfc29addd576f015d9adfd385fe05ca76cbe154d
parentc695abab2429cfa9554aa353702936d1f064f073
mfd: arizona: Add sensible return value to some error paths

There are some cases in arizona_dev_init, such as where we don't
recognise the chip ID, in which we head to the error path without
setting a sensible error code in ret. This would lead to the chip
silently failing probe, as it would still return 0. Fix this up by
adding appropriate sets of the return value.

Whilst adding these update the existing paths that do return an error
when the chip is not recognised to use ENODEV, which seems like a better
fit.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/arizona-core.c