[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20210514064843.11908-1-yuehaibing@huawei.com>
Date: Fri, 14 May 2021 14:48:43 +0800
From: YueHaibing <yuehaibing@...wei.com>
To: <myungjoo.ham@...sung.com>, <kyungmin.park@...sung.com>,
<cw00.choi@...sung.com>, <b.zolnierkie@...sung.com>,
<lukasz.luba@....com>
CC: <linux-pm@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
YueHaibing <yuehaibing@...wei.com>
Subject: [PATCH -next] PM / devfreq: Add missing error code in devfreq_add_device()
Set err code in the error path before jumping to the end of the function.
Fixes: 4dc3bab8687f ("PM / devfreq: Add support delayed timer for polling mode")
Signed-off-by: YueHaibing <yuehaibing@...wei.com>
---
drivers/devfreq/devfreq.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
index fe08c46642f7..28f3e0ba6cdd 100644
--- a/drivers/devfreq/devfreq.c
+++ b/drivers/devfreq/devfreq.c
@@ -823,6 +823,7 @@ struct devfreq *devfreq_add_device(struct device *dev,
if (devfreq->profile->timer < 0
|| devfreq->profile->timer >= DEVFREQ_TIMER_NUM) {
mutex_unlock(&devfreq->lock);
+ err = -EINVAL;
goto err_dev;
}
--
2.17.1
Powered by blists - more mailing lists