regulator: gpio-regulator: Don't oops on missing regulator-type property
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Sat, 9 Nov 2013 12:12:28 +0000 (13:12 +0100)
committerMark Brown <broonie@linaro.org>
Sat, 9 Nov 2013 15:06:22 +0000 (15:06 +0000)
commit251b9c21d26ca9d210e7673f0819ee1f6c19402a
tree94fc2dea8cb5df0789fcaa9bb4b65f466a3dd8c1
parent5e01dc7b26d9f24f39abace5da98ccbd6a5ceb52
regulator: gpio-regulator: Don't oops on missing regulator-type property

Catch missing regulator-type property in DT and return an error
gracefully instead of deferencing a NULL pointer and crashing.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/regulator/gpio-regulator.c