Re: [PATCH v3 1/2] mfd: rk808: Check pm_power_off pointer

From: Lee Jones
Date: Wed Jun 12 2019 - 05:46:10 EST


On Fri, 07 Jun 2019, Stefan Mavrodiev wrote:

> 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@xxxxxxxxxx>
> ---
> Changes is v3:
> - Add explanation comments
> Changes in v2:
> - Initial release actually
>
> drivers/mfd/rk808.c | 17 +++++++++++------
> include/linux/mfd/rk808.h | 1 +
> 2 files changed, 12 insertions(+), 6 deletions(-)

Applied, thanks.

--
Lee Jones [æçæ]
Linaro Services Technical Lead
Linaro.org â Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog