drm/display: remove redundant ternary operator
Subsystems (3)
PATCH 1/1 drm/display: remove redundant ternary operator
The ternary operator is checking if ret is less than zero inside an if block that also checks if ret is less than zero. Since the nested ternary statement is always true then the -EIO return is never executed and can be removed.
Signed-off-by Colin Ian King <[email protected]>
--- drivers/gpu/drm/display/drm_dp_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/display/drm_dp_helper.c +1 -1
@@ -4192,7 +4192,7 @@ drm_edp_backlight_probe_state(struct drm_dp_aux *aux, struct drm_edp_backlight_iif (ret <0 ) {drm_dbg_kms (aux->drm_dev,"%s: Failed to read backlight mode: %d\n" , aux->name, ret); -return ret <0 ? ret : -EIO ; +return ret; } *current_mode = (mode_reg &DP_EDP_BACKLIGHT_CONTROL_MODE_MASK );
Signature · 1 line
2.49.0