Skip to contentSkip to conversation

drm/panel: remove meaningless if(ret) check code.

PATCH New Bernard Zhao 1 participant 1 message Jul 22, 2020

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

PATCH 1/1 drm/panel: remove meaningless if(ret) check code.

The function drm_panel_add always returns true. So if(ret) check code will never run into error branch. Remove these check will make the code a bit readable.

---
 drivers/gpu/drm/panel/panel-feiyang-fy07024di26a30d.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/gpu/drm/panel/panel-feiyang-fy07024di26a30d.c +1 -3
index 95b789ab9d29..2c168a405928 100644
@@ -225,9 +225,7 @@ static int feiyang_dsi_probe(struct mipi_dsi_device *dsi)
 	if (ret)
 		return ret;
 
-	ret = drm_panel_add(&ctx->panel);
-	if (ret < 0)
-		return ret;
+	drm_panel_add(&ctx->panel);
 
 	dsi->mode_flags = MIPI_DSI_MODE_VIDEO_BURST;
 	dsi->format = MIPI_DSI_FMT_RGB888;
Signature · 1 line
2.17.1