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

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;