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)
commitbaf73e2c4e25aa57a7bd5df90a93e65be0542c74
treeb09c903aa74c239f30a550f8de6abb433ad991bd
parentf503071b03dcac6908fb7e051cfc9c45bea084c0
regulator: lp872x: Return -EINVAL if pdata is NULL

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>
drivers/regulator/lp872x.c
This page took 0.036637 seconds and 5 git commands to generate.