mfd: mfd-core: Protect against NULL call-back function pointer
commitb195e101580db390f50b0d587b7f66f241d2bc88
authorLee Jones <lee.jones@linaro.org>
Mon, 21 Oct 2019 09:16:34 +0000 (21 10:16 +0100)
committerLee Jones <lee.jones@linaro.org>
Mon, 11 Nov 2019 08:45:03 +0000 (11 08:45 +0000)
tree35f5a044a7379036a0bd9dce890bad2125176620
parent99cd1059759833f83cc7e442fe2c3b0bd4dff399
mfd: mfd-core: Protect against NULL call-back function pointer

If a child device calls mfd_cell_{en,dis}able() without an appropriate
call-back being set, we are likely to encounter a panic.  Avoid this
by adding suitable checking.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Reviewed-by: Mark Brown <broonie@kernel.org>
drivers/mfd/mfd-core.c