Thread (18 messages) 18 messages, 3 authors, 2026-02-03

Re: [PATCH 1/3] drm/bridge: imx8qxp-ldb: Fix NULL pointer dereference in imx8qxp_ldb_bridge_destroy()

From: "Luca Ceresoli" <luca.ceresoli@bootlin.com>
Date: 2026-01-26 08:29:58
Also in: dri-devel, imx, lkml

On Fri Jan 23, 2026 at 10:22 AM CET, Liu Ying wrote:
Pointer bridge->driver_private in imx8qxp_ldb_bridge_destroy() is NULL
when a LDB channel is unavailable or imx8qxp_ldb_probe() returns error,
because ldb_add_bridge_helper() is the last function called from
imx8qxp_ldb_probe() and it doesn't initialize bridge->driver_private if
a LDB channel is unavailable.  The NULL pointer would be set to pointer
ldb_ch and then NULL pointer ldb_ch would be dereferenced.  Fix this
by returning early from imx8qxp_ldb_bridge_destroy() if !ldb_ch is true.

Fixes: 32529d384cea ("drm/bridge: imx8qxp-ldb: convert to of_drm_find_and_get_bridge()")
Signed-off-by: Liu Ying <victor.liu@nxp.com>
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>

--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help