projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d07f6ca
)
PM / devfreq: Add missing error code in devfreq_add_device()
author
YueHaibing
<yuehaibing@huawei.com>
Fri, 14 May 2021 06:48:43 +0000
(14:48 +0800)
committer
Chanwoo Choi
<cw00.choi@samsung.com>
Thu, 20 May 2021 03:16:41 +0000
(12:16 +0900)
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@huawei.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
drivers/devfreq/devfreq.c
patch
|
blob
|
history
diff --git
a/drivers/devfreq/devfreq.c
b/drivers/devfreq/devfreq.c
index fe08c46642f7c5ccda920c949d913796c21c9046..28f3e0ba6cdd9b3c5ec878f0abc4639a4a3f67db 100644
(file)
--- 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;
}