From: Chanwoo Choi Date: Thu, 19 May 2022 01:07:53 +0000 (+0900) Subject: PM / devfreq: passive: Return non-error when not-supported event is required X-Git-Tag: v5.19-rc1~182^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=42d2607d91c4ec37ea1970899c2d614824f3014b;p=thirdparty%2Flinux.git PM / devfreq: passive: Return non-error when not-supported event is required Each devfreq governor specifies the supported governor event such as GOV_START and GOV_STOP. When not-supported event is required, just return non-error. But, commit ce9a0d88d97a ("PM / devfreq: Add cpu based scaling support to passive governor") returned the error value. So that return non-error value when not-supported event is required. Fixes: ce9a0d88d97a ("PM / devfreq: Add cpu based scaling support to passive governor") Reported-by: Marek Szyprowski Signed-off-by: Chanwoo Choi Signed-off-by: Rafael J. Wysocki --- diff --git a/drivers/devfreq/governor_passive.c b/drivers/devfreq/governor_passive.c index 7306e943a2349..72c67979ebe11 100644 --- a/drivers/devfreq/governor_passive.c +++ b/drivers/devfreq/governor_passive.c @@ -402,7 +402,7 @@ static int devfreq_passive_event_handler(struct devfreq *devfreq, { struct devfreq_passive_data *p_data = (struct devfreq_passive_data *)devfreq->data; - int ret = -EINVAL; + int ret = 0; if (!p_data) return -EINVAL;