Skip to content
Snippets Groups Projects
Commit d2059529 authored by Gianfranco Mariotti's avatar Gianfranco Mariotti Committed by Michele Cirinei
Browse files

thermal: imx8mm: Print the correct error code

Currently the error message does not print the correct error code.

Fix it by initializing 'ret' to the proper error code.

REFERENCE:
https://git.toradex.com/cgit/linux-toradex.git/commit/drivers/thermal/imx8mm_thermal.c?h=toradex_5.15-2.2.x-imx&id=ce662ccde5c6ae4f4d89fe71570bf59441004eb9
parent 14e62810
No related branches found
No related tags found
1 merge request!155[i.MX8MP] thermal: i.mx8mm: apply patches
......@@ -217,10 +217,11 @@ static int imx8mm_tmu_probe(struct platform_device *pdev)
&tmu->sensors[i],
&tmu_tz_ops);
if (IS_ERR(tmu->sensors[i].tzd)) {
ret = PTR_ERR(tmu->sensors[i].tzd);
dev_err(&pdev->dev,
"failed to register thermal zone sensor[%d]: %d\n",
i, ret);
return PTR_ERR(tmu->sensors[i].tzd);
return ret;
}
tmu->sensors[i].hw_id = i;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment