Commit 18b380ed authored by YueHaibing's avatar YueHaibing Committed by Chanwoo Choi

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: 4dc3bab8 ("PM / devfreq: Add support delayed timer for polling mode")
Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
Signed-off-by: default avatarChanwoo Choi <cw00.choi@samsung.com>
parent d07f6ca9
...@@ -823,6 +823,7 @@ struct devfreq *devfreq_add_device(struct device *dev, ...@@ -823,6 +823,7 @@ struct devfreq *devfreq_add_device(struct device *dev,
if (devfreq->profile->timer < 0 if (devfreq->profile->timer < 0
|| devfreq->profile->timer >= DEVFREQ_TIMER_NUM) { || devfreq->profile->timer >= DEVFREQ_TIMER_NUM) {
mutex_unlock(&devfreq->lock); mutex_unlock(&devfreq->lock);
err = -EINVAL;
goto err_dev; goto err_dev;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment