aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2015-11-04 16:36:20 +0300
committerAlex Shi <alex.shi@linaro.org>2016-05-27 15:28:41 +0800
commit179e2ed68cd66c339fee38b2f6f28ca2c907b876 (patch)
tree31c77221168f24e798559b76a27dca02220a27fa
parentd9fdb8d590ae535a18a04a288c4dc93be549ed8f (diff)
devfreq_cooling: return on allocation failurev4.1/topic/devfreq-cooling
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> (cherry picked from commit ce5ee1611284bef81d0308c6c2749902f55ed1d5) Signed-off-by: Alex Shi <alex.shi@linaro.org>
-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),