Skip to content

Commit 1007d2c

Browse files
Erick Archerrafaeljw
authored andcommitted
thermal: int3400: Use sizeof(*pointer) instead of sizeof(type)
It is preferred to use sizeof(*pointer) instead of sizeof(type) due to the type of the variable can change and one needs not change the former (unlike the latter). This patch has no effect on runtime behavior. Signed-off-by: Erick Archer <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent a31a0a3 commit 1007d2c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/thermal/intel/int340x_thermal/int3400_thermal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ static int int3400_thermal_probe(struct platform_device *pdev)
571571
if (!adev)
572572
return -ENODEV;
573573

574-
priv = kzalloc(sizeof(struct int3400_thermal_priv), GFP_KERNEL);
574+
priv = kzalloc(sizeof(*priv), GFP_KERNEL);
575575
if (!priv)
576576
return -ENOMEM;
577577

0 commit comments

Comments
 (0)