thermal/of: Fix error code in of_thermal_zone_find()
Currently, if we cannot find the correct thermal zone then this error path returns NULL and it would lead to an Oops in the caller. Return ERR_PTR(-EINVAL) instead. Fixes: 3bd52ac87347 ("thermal/of: Rework the thermal device tree initialization") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/YvDzovkMCQecPDjz@kiliSigned-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Showing
Please register or sign in to comment