Skip to content

Commit

Permalink
thermal: tegra: fix memory allocation
Browse files Browse the repository at this point in the history
Fix memory allocation to store the pointers to
thermal_zone_device.

Signed-off-by: Wei Ni <[email protected]>
Acked-by: Thierry Reding <[email protected]>
Reviewed-by: Daniel Lezcano <[email protected]>
Signed-off-by: Eduardo Valentin <[email protected]>
  • Loading branch information
wni-WeiNi authored and Eduardo Valentin committed Feb 21, 2019
1 parent cd28561 commit 3d88adf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/thermal/tegra/soctherm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1329,7 +1329,7 @@ static int tegra_soctherm_probe(struct platform_device *pdev)
}

tegra->thermctl_tzs = devm_kcalloc(&pdev->dev,
soc->num_ttgs, sizeof(*z),
soc->num_ttgs, sizeof(z),
GFP_KERNEL);
if (!tegra->thermctl_tzs)
return -ENOMEM;
Expand Down

0 comments on commit 3d88adf

Please sign in to comment.