mirror of https://gitee.com/openkylin/linux.git
thermal: tegra: fix memory allocation
Fix memory allocation to store the pointers to thermal_zone_device. Signed-off-by: Wei Ni <wni@nvidia.com> Acked-by: Thierry Reding <treding@nvidia.com> Reviewed-by: Daniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
This commit is contained in:
parent
cd28561dce
commit
3d88adf3ef
|
@ -1329,7 +1329,7 @@ static int tegra_soctherm_probe(struct platform_device *pdev)
|
||||||
}
|
}
|
||||||
|
|
||||||
tegra->thermctl_tzs = devm_kcalloc(&pdev->dev,
|
tegra->thermctl_tzs = devm_kcalloc(&pdev->dev,
|
||||||
soc->num_ttgs, sizeof(*z),
|
soc->num_ttgs, sizeof(z),
|
||||||
GFP_KERNEL);
|
GFP_KERNEL);
|
||||||
if (!tegra->thermctl_tzs)
|
if (!tegra->thermctl_tzs)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
Loading…
Reference in New Issue