Re: [PATCH 3/4] PM / Domains: Respect errors from genpd's ->power_off() callback

Bartlomiej Zolnierkiewicz
2017-03-20T17:14:21Z

On Monday, March 20, 2017 11:19:22 AM Ulf Hansson wrote:
> The current code in genpd_sync_power_off(), doesn't care about potential
> errors being returned from genpd's ->power_off() callback.
>
> Obviously this behaviour could lead to problems, such as incorrectly
> setting the genpd's status to GPD_STATE_POWER_OFF, but also to incorrectly
> decrease the subdomain count for the masters, which potentially allows them
> to be powered off in the next recursive call to genpd_sync_power_off().
>
> Let's fix this behaviour by bailing out when the ->power_off() callback
> returns an error code.
>
> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics