regulator: Fix possible nullpointer dereference in regulator_enable()
From: Heiko Stuebner <heiko@...> Date: Sun, 18 Sep 2011 16:54:50 +0200
Commit-Message
In the case where _regulator_enable returns an error it was not checked if a supplying regulator exists before trying to disable it, leading to a null pointer-dereference if no supplying regulator existed. Signed-off-by: Heiko Stuebner <heiko@...> Acked-by: Mark Brown <broonie@...>
Patch-Comment
no changes, except adding the ack from Mark Brown and including the relevant (and forgotten in the first try) LKML drivers/regulator/core.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
Statistics
- 1 lines added
- 1 lines removed