drm/panel: nt36523: fix parameter check in nt36523_probe()
PATCH 1/1 drm/panel: nt36523: fix parameter check in nt36523_probe()
Make IS_ERR() judge the mipi_dsi_device_register_full() function return in nt36523_probe().
Signed-off-by Minjie Du <[email protected]>
--- drivers/gpu/drm/panel/panel-novatek-nt36523.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/panel/panel-novatek-nt36523.c +1 -1
@@ -1266,7 +1266,7 @@ static int nt36523_probe(struct mipi_dsi_device *dsi)return dev_err_probe (dev, -EPROBE_DEFER ,"cannot get secondary DSI host\n" ); pinfo->dsi[1 ] =mipi_dsi_device_register_full (dsi1_host, info); -if (!pinfo->dsi[1 ]) { +if (IS_ERR (pinfo->dsi[1 ])) {dev_err (dev,"cannot get secondary DSI device\n" );return -ENODEV ; }
Signature · 1 line
2.39.0
Quoted 1 line
Make
IS_ERR()judge themipi_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: nt36523: Fix an error check in nt36523_probe() be more appropriate?
Regards,
Markus