Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ce5ee161 authored by Dan Carpenter's avatar Dan Carpenter Committed by Eduardo Valentin
Browse files

devfreq_cooling: return on allocation failure



If the allocation fails then we can't continue.

Fixes: a76caf55 ('thermal: Add devfreq cooling')
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarEduardo Valentin <edubezval@gmail.com>
parent 7e38a5b1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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),