mirror of https://gitee.com/openkylin/linux.git
thermal: cpu_cooling: Pass variable instead of its type to sizeof()
Just following coding guidelines here. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
This commit is contained in:
parent
07d888d831
commit
98d522f056
|
@ -476,8 +476,7 @@ __cpufreq_cooling_register(struct device_node *np,
|
||||||
return ERR_PTR(-EINVAL);
|
return ERR_PTR(-EINVAL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
cpufreq_dev = kzalloc(sizeof(struct cpufreq_cooling_device),
|
cpufreq_dev = kzalloc(sizeof(*cpufreq_dev), GFP_KERNEL);
|
||||||
GFP_KERNEL);
|
|
||||||
if (!cpufreq_dev)
|
if (!cpufreq_dev)
|
||||||
return ERR_PTR(-ENOMEM);
|
return ERR_PTR(-ENOMEM);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue