Skip to contentSkip to conversation

drm/display: dp: delete some dead code

PATCH In review Dan Carpenter 2 participants 2 messages Apr 10, 2025

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/display: dp: delete some dead code

We re-worked this code a bit in commit af67978ee37e ("drm/display: dp:
use new DCPD access helpers") but there was a little bit of stray dead code left over. Clean it up.

---
 drivers/gpu/drm/display/drm_dp_helper.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)
drivers/gpu/drm/display/drm_dp_helper.c +2 -7
index 57828f2b7b5a..f38b4dc14e1c 100644
@@ -3570,7 +3570,6 @@ EXPORT_SYMBOL(drm_dp_pcon_frl_configure_1);
 int drm_dp_pcon_frl_configure_2(struct drm_dp_aux *aux, int max_frl_mask,
 				u8 frl_type)
 {
-	int ret;
 	u8 buf = max_frl_mask;
 
 	if (frl_type == DP_PCON_FRL_LINK_TRAIN_EXTENDED)
@@ -3579,10 +3578,6 @@ int drm_dp_pcon_frl_configure_2(struct drm_dp_aux *aux, int max_frl_mask,
 		buf &= ~DP_PCON_FRL_LINK_TRAIN_EXTENDED;
 
 	return drm_dp_dpcd_write_byte(aux, DP_PCON_HDMI_LINK_CONFIG_2, buf);
-	if (ret < 0)
-		return ret;
-
-	return 0;
 }
 EXPORT_SYMBOL(drm_dp_pcon_frl_configure_2);
 
@@ -4044,7 +4039,7 @@ int drm_edp_backlight_enable(struct drm_dp_aux *aux, const struct drm_edp_backli
 	if (ret < 0) {
 		drm_dbg_kms(aux->drm_dev, "%s: Failed to write aux backlight mode: %d\n",
 			    aux->name, ret);
-		return ret < 0 ? ret : -EIO;
+		return ret;
 	}
 
 	ret = drm_edp_backlight_set_level(aux, bl, level);
@@ -4192,7 +4187,7 @@ drm_edp_backlight_probe_state(struct drm_dp_aux *aux, struct drm_edp_backlight_i
 	if (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.47.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Dan Carpenter

We re-worked this code a bit in commit af67978ee37e ("drm/display: dp:
use new DCPD access helpers") but there was a little bit of stray dead code left over. Clean it up.

---
 drivers/gpu/drm/display/drm_dp_helper.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)
Fixes af67978ee37e ("drm/display: dp: use new DCPD access helpers")
Signature · 2 lines
With best wishes
Dmitry