projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1b57b95
)
thermal: imx8mm: Print the correct error code
author
Fabio Estevam
<festevam@gmail.com>
Wed, 2 Dec 2020 23:24:47 +0000
(20:24 -0300)
committer
Daniel Lezcano
<daniel.lezcano@linaro.org>
Fri, 4 Dec 2020 19:46:03 +0000
(20:46 +0100)
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
drivers/thermal/imx8mm_thermal.c
patch
|
blob
|
history
diff --git
a/drivers/thermal/imx8mm_thermal.c
b/drivers/thermal/imx8mm_thermal.c
index
a1e4f9b
..
ce7cb64
100644
(file)
--- a/
drivers/thermal/imx8mm_thermal.c
+++ b/
drivers/thermal/imx8mm_thermal.c
@@
-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;
}