mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-24 04:34:08 +08:00
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: 4dc3bab868
("PM / devfreq: Add support delayed timer for polling mode")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
This commit is contained in:
parent
d07f6ca923
commit
18b380ed61
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user