diff options
author | Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> | 2022-09-09 19:13:22 +0100 |
---|---|---|
committer | Daniel Lezcano <daniel.lezcano@linaro.org> | 2022-10-04 11:21:30 +0200 |
commit | c71d8035f1b77dc8e29e41942ab31900fa79c1ae (patch) | |
tree | 04936bd6a8aa90050de804837b345d4ea61209fc /drivers/thermal | |
parent | c7114365e3b7566cba86902123538c7d9bb62b7a (diff) | |
download | linux-stable-c71d8035f1b77dc8e29e41942ab31900fa79c1ae.tar.gz linux-stable-c71d8035f1b77dc8e29e41942ab31900fa79c1ae.tar.bz2 linux-stable-c71d8035f1b77dc8e29e41942ab31900fa79c1ae.zip |
thermal/core: Drop valid pointer check for type
Drop the valid pointer check for type in
thermal_zone_device_register_with_trips() as we already have it confirmed
for != NULL from the previous if block.
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Link: https://lore.kernel.org/r/20220909181322.10933-1-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Diffstat (limited to 'drivers/thermal')
-rw-r--r-- | drivers/thermal/thermal_core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index 7e669b60a065..117eeaf7dd24 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c @@ -1186,7 +1186,7 @@ thermal_zone_device_register_with_trips(const char *type, struct thermal_trip *t return ERR_PTR(-EINVAL); } - if (type && strlen(type) >= THERMAL_NAME_LENGTH) { + if (strlen(type) >= THERMAL_NAME_LENGTH) { pr_err("Thermal zone name (%s) too long, should be under %d chars\n", type, THERMAL_NAME_LENGTH); return ERR_PTR(-EINVAL); |