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: NDan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/YvDzovkMCQecPDjz@kiliSigned-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
Showing
想要评论请 注册 或 登录