Commit 3d88adf3 authored by Wei Ni's avatar Wei Ni Committed by Eduardo Valentin

thermal: tegra: fix memory allocation

Fix memory allocation to store the pointers to
thermal_zone_device.
Signed-off-by: default avatarWei Ni <wni@nvidia.com>
Acked-by: default avatarThierry Reding <treding@nvidia.com>
Reviewed-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: default avatarEduardo Valentin <edubezval@gmail.com>
parent cd28561d
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment