Skip to content

Commit f8fd096

Browse files
Yang Yingliangsuperna9999
authored andcommitted
drm/panel: novatek-nt35950: fix return value check in nt35950_probe()
mipi_dsi_device_register_full() never returns NULL pointer, it will return ERR_PTR() when it fails, so replace the check with IS_ERR(). Fixes: 623a353 ("drm/panel: Add driver for Novatek NT35950 DSI DriverIC panels") Signed-off-by: Yang Yingliang <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Neil Armstrong <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent e1e1af9 commit f8fd096

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/gpu/drm/panel/panel-novatek-nt35950.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -481,9 +481,9 @@ static int nt35950_probe(struct mipi_dsi_device *dsi)
481481
return dev_err_probe(dev, -EPROBE_DEFER, "Cannot get secondary DSI host\n");
482482

483483
nt->dsi[1] = mipi_dsi_device_register_full(dsi_r_host, info);
484-
if (!nt->dsi[1]) {
484+
if (IS_ERR(nt->dsi[1])) {
485485
dev_err(dev, "Cannot get secondary DSI node\n");
486-
return -ENODEV;
486+
return PTR_ERR(nt->dsi[1]);
487487
}
488488
num_dsis++;
489489
}

0 commit comments

Comments
 (0)