OSDN Git Service
(root)
/
tomoyo
/
tomoyo-test1.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
49ee766
)
drm/panel/panel-sitronix-st7701: Remove panel on DSI attach failure
author
Marek Vasut
<marex@denx.de>
Fri, 14 Oct 2022 23:11:06 +0000
(
01:11
+0200)
committer
Linus Walleij
<linus.walleij@linaro.org>
Tue, 1 Nov 2022 22:12:06 +0000
(23:12 +0100)
In case mipi_dsi_attach() fails, call drm_panel_remove() to
avoid memory leak.
Fixes:
849b2e3ff969
("drm/panel: Add Sitronix ST7701 panel driver")
Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link:
https://patchwork.freedesktop.org/patch/msgid/20221014231106.468063-1-marex@denx.de
drivers/gpu/drm/panel/panel-sitronix-st7701.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/panel/panel-sitronix-st7701.c
b/drivers/gpu/drm/panel/panel-sitronix-st7701.c
index
baeb952
..
0b8cf65
100644
(file)
--- a/
drivers/gpu/drm/panel/panel-sitronix-st7701.c
+++ b/
drivers/gpu/drm/panel/panel-sitronix-st7701.c
@@
-754,7
+754,15
@@
static int st7701_dsi_probe(struct mipi_dsi_device *dsi)
st7701->dsi = dsi;
st7701->desc = desc;
- return mipi_dsi_attach(dsi);
+ ret = mipi_dsi_attach(dsi);
+ if (ret)
+ goto err_attach;
+
+ return 0;
+
+err_attach:
+ drm_panel_remove(&st7701->panel);
+ return ret;
}
static void st7701_dsi_remove(struct mipi_dsi_device *dsi)