diff options
author | Sudip Mukherjee <sudipm.mukherjee@gmail.com> | 2020-04-24 19:19:44 +0300 |
---|---|---|
committer | Daniel Lezcano <daniel.lezcano@linaro.org> | 2020-04-29 17:38:58 +0300 |
commit | 7440f518dad9d861d76c64956641eeddd3586f75 (patch) | |
tree | 000e1d14685866ff11385de8627d35a8b3ebc6dc /drivers/thermal/qoriq_thermal.c | |
parent | 770ae40cd6d23eb331572b8913f51dc715c9d460 (diff) | |
download | linux-7440f518dad9d861d76c64956641eeddd3586f75.tar.xz |
thermal/drivers/ti-soc-thermal: Avoid dereferencing ERR_PTR
On error the function ti_bandgap_get_sensor_data() returns the error
code in ERR_PTR() but we only checked if the return value is NULL or
not. And, so we can dereference an error code inside ERR_PTR.
While at it, convert a check to IS_ERR_OR_NULL.
Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Reviewed-by: Amit Kucheria <amit.kucheria@linaro.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20200424161944.6044-1-sudipm.mukherjee@gmail.com
Diffstat (limited to 'drivers/thermal/qoriq_thermal.c')
0 files changed, 0 insertions, 0 deletions