mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00: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
1 changed files with 2 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue