Coverity noticed that the code after the return statement in the
"drm_dp_pcon_frl_configure_2" function is never reached. So, it can be
safely removed.

Coverity-id: 1648885
Fixes: af67978ee37e5 ("drm/display: dp: use new DCPD access helpers")
Signed-off-by: Len Bao <[email protected]>
---
Changes in v2:
 - Remove the variable definition (kernel test robot)

v1 -> https://lore.kernel.org/all/[email protected]/
---
 drivers/gpu/drm/display/drm_dp_helper.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/gpu/drm/display/drm_dp_helper.c 
b/drivers/gpu/drm/display/drm_dp_helper.c
index dc622c78d..fcff51b6e 100644
--- a/drivers/gpu/drm/display/drm_dp_helper.c
+++ b/drivers/gpu/drm/display/drm_dp_helper.c
@@ -3577,7 +3577,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)
@@ -3586,10 +3585,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);
 
-- 
2.43.0

Reply via email to