regulator: lp872x: Return -EINVAL if pdata is NULL
authorAxel Lin <axel.lin@gmail.com>
Wed, 20 Jun 2012 08:13:15 +0000 (16:13 +0800)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 20 Jun 2012 10:18:38 +0000 (11:18 +0100)
Return -EINVAL if pdata is NULL, otherwise we have NULL dereference bug.
This patch also moves the code checking pdata earlier in lp872x_probe.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

No differences found