Skip to content

Commit c71d803

Browse files
prabhakarladdlezcano
authored andcommitted
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>
1 parent c711436 commit c71d803

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/thermal/thermal_core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1186,7 +1186,7 @@ thermal_zone_device_register_with_trips(const char *type, struct thermal_trip *t
11861186
return ERR_PTR(-EINVAL);
11871187
}
11881188

1189-
if (type && strlen(type) >= THERMAL_NAME_LENGTH) {
1189+
if (strlen(type) >= THERMAL_NAME_LENGTH) {
11901190
pr_err("Thermal zone name (%s) too long, should be under %d chars\n",
11911191
type, THERMAL_NAME_LENGTH);
11921192
return ERR_PTR(-EINVAL);

0 commit comments

Comments
 (0)