mirror of
https://github.com/torvalds/linux.git
synced 2026-05-23 06:31:58 +02:00
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: Fabio Estevam <festevam@gmail.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20201202232448.2692-1-festevam@gmail.com
This commit is contained in:
parent
1b57b9597c
commit
ce662ccde5
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user