Commit 14302ab0 authored by Dan Carpenter's avatar Dan Carpenter Committed by Linus Walleij

drm/panel: magnachip: Prevent error pointer dereference in probe

Don't dereference "db->dsi_dev" when it is an error pointer.

Fixes: 249a4f5e ("drm/panel: Add Magnachip D53E6EA8966 Panel Driver")
Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/de0273a8-8910-4ac4-b4ed-f7691c4d2ca6@kili.mountain
parent bd2eefd0
......@@ -418,7 +418,7 @@ static int d53e6ea8966_probe(struct spi_device *spi)
if (IS_ERR(db->dsi_dev)) {
dev_err(dev, "failed to register dsi device: %ld\n",
PTR_ERR(db->dsi_dev));
ret = PTR_ERR(db->dsi_dev);
return PTR_ERR(db->dsi_dev);
}
db->dsi_dev->lanes = 2;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment