diff options
author | Dan Carpenter <error27@gmail.com> | 2023-03-22 12:07:10 +0300 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2023-03-28 00:23:00 +0300 |
commit | 14302ab0d6550ef0ea48f213b0ab13c9249de185 (patch) | |
tree | 3621e57d3afe0d04b8f40c1d1c81f60988964029 /drivers/gpu/drm/panel | |
parent | bd2eefd018e5a8066b7bc66d8e200fbe3095ea5e (diff) | |
download | linux-14302ab0d6550ef0ea48f213b0ab13c9249de185.tar.xz |
drm/panel: magnachip: Prevent error pointer dereference in probe
Don't dereference "db->dsi_dev" when it is an error pointer.
Fixes: 249a4f5e663c ("drm/panel: Add Magnachip D53E6EA8966 Panel Driver")
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/de0273a8-8910-4ac4-b4ed-f7691c4d2ca6@kili.mountain
Diffstat (limited to 'drivers/gpu/drm/panel')
-rw-r--r-- | drivers/gpu/drm/panel/panel-magnachip-d53e6ea8966.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/panel/panel-magnachip-d53e6ea8966.c b/drivers/gpu/drm/panel/panel-magnachip-d53e6ea8966.c index 8c362c40227f..26d358b9b85a 100644 --- a/drivers/gpu/drm/panel/panel-magnachip-d53e6ea8966.c +++ b/drivers/gpu/drm/panel/panel-magnachip-d53e6ea8966.c @@ -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; |