Skip to content

Commit fb18fe0

Browse files
Yang Yingliangsuperna9999
authored andcommitted
drm/panel: nt36523: fix return value check in nt36523_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: 0993234 ("drm/panel: Add driver for Novatek NT36523") 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 fc1ccc1 commit fb18fe0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1254,9 +1254,9 @@ static int nt36523_probe(struct mipi_dsi_device *dsi)
12541254
return dev_err_probe(dev, -EPROBE_DEFER, "cannot get secondary DSI host\n");
12551255

12561256
pinfo->dsi[1] = mipi_dsi_device_register_full(dsi1_host, info);
1257-
if (!pinfo->dsi[1]) {
1257+
if (IS_ERR(pinfo->dsi[1])) {
12581258
dev_err(dev, "cannot get secondary DSI device\n");
1259-
return -ENODEV;
1259+
return PTR_ERR(pinfo->dsi[1]);
12601260
}
12611261
}
12621262

0 commit comments

Comments
 (0)