Skip to content

Commit 18b380e

Browse files
YueHaibingchanwoochoi
authored andcommitted
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: 4dc3bab ("PM / devfreq: Add support delayed timer for polling mode") Signed-off-by: YueHaibing <[email protected]> Signed-off-by: Chanwoo Choi <[email protected]>
1 parent d07f6ca commit 18b380e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/devfreq/devfreq.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -823,6 +823,7 @@ struct devfreq *devfreq_add_device(struct device *dev,
823823
if (devfreq->profile->timer < 0
824824
|| devfreq->profile->timer >= DEVFREQ_TIMER_NUM) {
825825
mutex_unlock(&devfreq->lock);
826+
err = -EINVAL;
826827
goto err_dev;
827828
}
828829

0 commit comments

Comments
 (0)