diff options
| author | Osama Abdelkader <osama.abdelkader@gmail.com> | 2026-02-09 19:41:14 +0100 |
|---|---|---|
| committer | Luca Ceresoli <luca.ceresoli@bootlin.com> | 2026-02-20 13:56:14 +0100 |
| commit | 803ec1faf7c1823e6e3b1f2aaa81be18528c9436 (patch) | |
| tree | 07409946d9e394a0f20f3abc777b5d0d42dea6f8 /include/uapi/linux/taskstats.h | |
| parent | 496daa2759260374bb9c9b2196a849aa3bc513a8 (diff) | |
drm/bridge: samsung-dsim: Fix memory leak in error path
In samsung_dsim_host_attach(), drm_bridge_add() is called to add the
bridge. However, if samsung_dsim_register_te_irq() or
pdata->host_ops->attach() fails afterwards, the function returns
without removing the bridge, causing a memory leak.
Fix this by adding proper error handling with goto labels to ensure
drm_bridge_remove() is called in all error paths. Also ensure that
samsung_dsim_unregister_te_irq() is called if the attach operation
fails after the TE IRQ has been registered.
samsung_dsim_unregister_te_irq() function is moved without changes
to be before samsung_dsim_host_attach() to avoid forward declaration.
Fixes: e7447128ca4a ("drm: bridge: Generalize Exynos-DSI driver into a Samsung DSIM bridge")
Cc: stable@vger.kernel.org
Signed-off-by: Osama Abdelkader <osama.abdelkader@gmail.com>
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Link: https://patch.msgid.link/20260209184115.10937-1-osama.abdelkader@gmail.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Diffstat (limited to 'include/uapi/linux/taskstats.h')
0 files changed, 0 insertions, 0 deletions
