]> git.baikalelectronics.ru Git - kernel.git/commit
mfd: rk808: Check pm_power_off pointer
authorStefan Mavrodiev <stefan@olimex.com>
Fri, 7 Jun 2019 12:42:25 +0000 (15:42 +0300)
committerLee Jones <lee.jones@linaro.org>
Tue, 2 Jul 2019 11:11:31 +0000 (12:11 +0100)
commitf77e683a10797937ae06d86790d65909dfd070e9
tree594b62dc81e1c3efa627236786a733511367655a
parent663d117c36b2f3d16ba0b9beee883dda71aead61
mfd: rk808: Check pm_power_off pointer

The function pointer pm_power_off may point to function from other
module (PSCI for example). If rk808 is removed, pm_power_off is
overwritten to NULL and the system cannot be powered off.

This patch checks if pm_power_off points to a module function.

Signed-off-by: Stefan Mavrodiev <stefan@olimex.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/rk808.c
include/linux/mfd/rk808.h