summaryrefslogtreecommitdiff
path: root/drivers/thermal
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2015-11-04 16:36:20 +0300
committerSeung-Woo Kim <sw0312.kim@samsung.com>2016-12-14 13:51:23 +0900
commiteab5b1e1664226a39c5281a2d90264166c3493f9 (patch)
tree0054b1b660390703b05a0150a831daf9deda6fed /drivers/thermal
parentddbe12640d68aec61b166b1f5d7531c740f4a556 (diff)
devfreq_cooling: return on allocation failure
If the allocation fails then we can't continue. Fixes: a76caf55e5b3 ('thermal: Add devfreq cooling') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com> [jy0922.shim: apply mainline patch] Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Diffstat (limited to 'drivers/thermal')
-rw-r--r--drivers/thermal/devfreq_cooling.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/thermal/devfreq_cooling.c b/drivers/thermal/devfreq_cooling.c
index d1b7c32e7406..01f0015f80dc 100644
--- a/drivers/thermal/devfreq_cooling.c
+++ b/drivers/thermal/devfreq_cooling.c
@@ -397,7 +397,7 @@ static int devfreq_cooling_gen_tables(struct devfreq_cooling_device *dfc)
power_table = kcalloc(num_opps, sizeof(*power_table),
GFP_KERNEL);
if (!power_table)
- ret = -ENOMEM;
+ return -ENOMEM;
}
freq_table = kcalloc(num_opps, sizeof(*freq_table),