PM / devfreq: Fix devfreq_notifier_call returning errno
authorLeonard Crestez <leonard.crestez@nxp.com>
Thu, 31 Oct 2019 21:34:18 +0000 (23:34 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jan 2020 09:19:43 +0000 (10:19 +0100)
commiteae25dfc30249cf540a045365587a32e6bc9ca6a
tree08e222c28d5561afac55a7599a002b7a53e861f7
parent8db2bb9681b5c426b0fe2d3fde505ba779cf00aa
PM / devfreq: Fix devfreq_notifier_call returning errno

[ Upstream commit e876e710ede23f670494331e062d643928e4142a ]

Notifier callbacks shouldn't return negative errno but one of the
NOTIFY_OK/DONE/BAD values.

The OPP core will ignore return values from notifiers but returning a
value that matches NOTIFY_STOP_MASK will stop the notification chain.

Fix by always returning NOTIFY_OK.

Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Reviewed-by: Matthias Kaehlcke <mka@chromium.org>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/devfreq/devfreq.c