diff options
| author | Andrew Goodbody <[email protected]> | 2025-07-24 15:46:49 +0100 |
|---|---|---|
| committer | Fabio Estevam <[email protected]> | 2025-08-07 08:15:00 -0300 |
| commit | 66324e0cecaa99bf99dd39b5bca7f292b4225e0d (patch) | |
| tree | b44ab59c5679b222d7bdbe3ab242a372b1375ec1 /drivers/cpu | |
| parent | fa2c4149431db36b39e8ca2429d40b43111b4498 (diff) | |
cpu: imx8_cpu: Provide default temperatures
Add setting default temperatures to the weak version of
get_cpu_temp_grade so these values will not be used uninitialised.
This issue was found by Smatch.
Signed-off-by: Andrew Goodbody <[email protected]>
Diffstat (limited to 'drivers/cpu')
| -rw-r--r-- | drivers/cpu/imx8_cpu.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/cpu/imx8_cpu.c b/drivers/cpu/imx8_cpu.c index 4836bddd93b..950630453f9 100644 --- a/drivers/cpu/imx8_cpu.c +++ b/drivers/cpu/imx8_cpu.c @@ -201,6 +201,10 @@ static int cpu_imx_get_temp(struct cpu_imx_plat *plat) __weak u32 get_cpu_temp_grade(int *minc, int *maxc) { + if (minc && maxc) { + *minc = 0; + *maxc = 95; + } return 0; } |
