History

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().

Yang Yingliang committed 2 years ago

Commit fb18fe01 parent fc1ccc11 file · +2 −2Browse files

Unified · Split

drivers/gpu/drm/panel/panel-novatek-nt36523.c+2−2
@@ -1254,9 +1254,9 @@ static int nt36523_probe(struct mipi_dsi_device *dsi) · 1253 unmodified lines
1254 return dev_err_probe(dev, -EPROBE_DEFER, "cannot get secondary DSI host\n");1254 return dev_err_probe(dev, -EPROBE_DEFER, "cannot get secondary DSI host\n");
1255 1255
1256 pinfo->dsi[1] = mipi_dsi_device_register_full(dsi1_host, info);1256 pinfo->dsi[1] = mipi_dsi_device_register_full(dsi1_host, info);
1257 if (!pinfo->dsi[1]) {1257 if (IS_ERR(pinfo->dsi[1])) {
1258 dev_err(dev, "cannot get secondary DSI device\n");1258 dev_err(dev, "cannot get secondary DSI device\n");
1259 return -ENODEV;1259 return PTR_ERR(pinfo->dsi[1]);
1260 }1260 }
1261 }1261 }
1262 1262

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t