summaryrefslogtreecommitdiff
path: root/drivers/gpu
diff options
context:
space:
mode:
authorYang Yingliang <yangyingliang@huawei.com>2024-10-29 20:39:57 +0800
committerNeil Armstrong <neil.armstrong@linaro.org>2024-12-13 10:51:39 +0100
commitf8fd0968eff52cf092c0d517d17507ea2f6e5ea5 (patch)
tree36a8d45f4424ad6822af9649bb0ee0615375f159 /drivers/gpu
parente1e1af9148dc4c866eda3fb59cd6ec3c7ea34b1d (diff)
downloadlwn-f8fd0968eff52cf092c0d517d17507ea2f6e5ea5.tar.gz
lwn-f8fd0968eff52cf092c0d517d17507ea2f6e5ea5.zip
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: 623a3531e9cf ("drm/panel: Add driver for Novatek NT35950 DSI DriverIC panels") Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://lore.kernel.org/r/20241029123957.1588-1-yangyingliang@huaweicloud.com Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/20241029123957.1588-1-yangyingliang@huaweicloud.com
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/panel/panel-novatek-nt35950.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/panel/panel-novatek-nt35950.c b/drivers/gpu/drm/panel/panel-novatek-nt35950.c
index b036208f9356..08b22b592ab0 100644
--- a/drivers/gpu/drm/panel/panel-novatek-nt35950.c
+++ b/drivers/gpu/drm/panel/panel-novatek-nt35950.c
@@ -481,9 +481,9 @@ static int nt35950_probe(struct mipi_dsi_device *dsi)
return dev_err_probe(dev, -EPROBE_DEFER, "Cannot get secondary DSI host\n");
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;
+ return PTR_ERR(nt->dsi[1]);
}
num_dsis++;
}