regulator: core: fix possible NULL dereference
We were checking rdev->supply for NULL after dereferencing it. Lets check for rdev->supply along with _regulator_is_enabled() and call regulator_enable() only if rdev->supply is not NULL. Signed-off-by: NSudip Mukherjee <sudip@vectorindia.org> Signed-off-by: NMark Brown <broonie@kernel.org>
Showing
想要评论请 注册 或 登录