[PATCH v1] drm/panel: novatek-nt35950: fix parameter check in nt35950_probe()

Minjie Du duminjie at vivo.com
Thu Jul 13 09:07:24 UTC 2023


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

Signed-off-by: Minjie Du <duminjie at vivo.com>
---
 drivers/gpu/drm/panel/panel-novatek-nt35950.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/panel/panel-novatek-nt35950.c b/drivers/gpu/drm/panel/panel-novatek-nt35950.c
index 8b108ac80..4903bbf1d 100644
--- a/drivers/gpu/drm/panel/panel-novatek-nt35950.c
+++ b/drivers/gpu/drm/panel/panel-novatek-nt35950.c
@@ -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;
 		}
-- 
2.39.0



More information about the dri-devel mailing list