Commit ce662ccd authored by Fabio Estevam's avatar Fabio Estevam Committed by Daniel Lezcano

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.
Signed-off-by: default avatarFabio Estevam <festevam@gmail.com>
Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20201202232448.2692-1-festevam@gmail.com
parent 1b57b959
......@@ -166,10 +166,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;
}
......
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