mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 05:44:45 +01:00
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: 623a3531e9 ("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
This commit is contained in:
parent
e1e1af9148
commit
f8fd0968ef
1 changed files with 2 additions and 2 deletions
|
|
@ -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++;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue