diff mbox

[V2,08/26] thermal: cpu_cooling: Pass variable instead of its type to sizeof()

Message ID baf9a15535e8972fe23b78a64ca82bef7c15017a.1417664938.git.viresh.kumar@linaro.org (mailing list archive)
State Accepted
Delegated to: Eduardo Valentin
Headers show

Commit Message

Viresh Kumar Dec. 4, 2014, 4:11 a.m. UTC
Just following coding guidelines here.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 drivers/thermal/cpu_cooling.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox

Patch

diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c
index a5a9317..5378561 100644
--- a/drivers/thermal/cpu_cooling.c
+++ b/drivers/thermal/cpu_cooling.c
@@ -476,8 +476,7 @@  __cpufreq_cooling_register(struct device_node *np,
 				return ERR_PTR(-EINVAL);
 		}
 	}
-	cpufreq_dev = kzalloc(sizeof(struct cpufreq_cooling_device),
-			      GFP_KERNEL);
+	cpufreq_dev = kzalloc(sizeof(*cpufreq_dev), GFP_KERNEL);
 	if (!cpufreq_dev)
 		return ERR_PTR(-ENOMEM);