summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorYang Yingliang <yangyingliang@huawei.com>2023-11-29 10:07:15 +0100
committerNeil Armstrong <neil.armstrong@linaro.org>2023-11-29 16:54:23 +0100
commitfb18fe0fdf22a2f4512a8b644bb5ea1473829cda (patch)
tree2ac8e1bac3a7e2e680c8cff7362034617f0be66b /drivers
parentdrm/panel: starry-2081101qfh032011-53g: Fine tune the panel power sequence (diff)
downloadlinux-fb18fe0fdf22a2f4512a8b644bb5ea1473829cda.tar.xz
linux-fb18fe0fdf22a2f4512a8b644bb5ea1473829cda.zip
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: 0993234a0045 ("drm/panel: Add driver for Novatek NT36523") Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/r/20231129090715.856263-1-yangyingliang@huaweicloud.com Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20231129090715.856263-1-yangyingliang@huaweicloud.com
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/panel/panel-novatek-nt36523.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/panel/panel-novatek-nt36523.c b/drivers/gpu/drm/panel/panel-novatek-nt36523.c
index 9b9a7eb1bc60..a189ce236328 100644
--- a/drivers/gpu/drm/panel/panel-novatek-nt36523.c
+++ b/drivers/gpu/drm/panel/panel-novatek-nt36523.c
@@ -1254,9 +1254,9 @@ 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;
+ return PTR_ERR(pinfo->dsi[1]);
}
}