Skip to contentSkip to conversation

drm/panel: novatek-nt35950: fix parameter check in nt35950_probe()

PATCH In review Minjie Du 2 participants 2 messages Jul 13, 2023

Subsystems (3)
lore
Share & tools
lore

Minjie Du

author
#0 lore raw

PATCH 1/1 drm/panel: novatek-nt35950: fix parameter check in nt35950_probe()

Make IS_ERR() judge the mipi_dsi_device_register_full() function return in nt35950_probe().

---
 drivers/gpu/drm/panel/panel-novatek-nt35950.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/panel/panel-novatek-nt35950.c +1 -1
index 8b108ac80..4903bbf1d 100644
@@ -571,7 +571,7 @@ static int nt35950_probe(struct mipi_dsi_device *dsi)
 		}
 
 		nt->dsi[1] = mipi_dsi_device_register_full(dsi_r_host, info);
-		if (!nt->dsi[1]) {
+		if (IS_ERR(nt->dsi[1])) {
 			dev_err(dev, "Cannot get secondary DSI node\n");
 			return -ENODEV;
 		}
Signature · 1 line
2.39.0
#1 lore raw
Quoted 1 line

Make IS_ERR() judge the mipi_dsi_device_register_full() function return

Would the term “return value” be relevant here?

Would you like to improve this change description also according to review comments from other patches?

How do you think about to add the tag “Fixes” because of a desirable source code adjustment?

Would a subject like “[PATCH v2] drm/panel: novatek-nt35950: Fix an error check in nt35950_probe() be more appropriate?

Regards,
Markus