linux/drivers/gpu/drm/bridge/imx
Guangshuo Li 53597deca0 drm/bridge: imx8qxp-pxl2dpi: avoid ERR_PTR with device_node cleanup
imx8qxp_pxl2dpi_get_available_ep_from_port() returns ERR_PTR()
on errors. imx8qxp_pxl2dpi_find_next_bridge() stores its return
value in a __free(device_node) variable before checking IS_ERR().
When the function returns on the error path, the cleanup action calls
of_node_put() on the ERR_PTR() value.

Do not let a device_node cleanup variable hold error pointers. Change
imx8qxp_pxl2dpi_get_available_ep_from_port() to return an int and pass
the endpoint node through an output argument. Initialize the output
argument to NULL so callers hold either NULL on error paths or a valid
device_node pointer on successful path.

Fixes: ceea3f7806 ("drm/bridge: imx8qxp-pxl2dpi: simplify put of device_node pointers")
Cc: stable@vger.kernel.org
Reviewed-by: Liu Ying <victor.liu@nxp.com>
Signed-off-by: Guangshuo Li <lgs201920130244@gmail.com>
Link: https://patch.msgid.link/20260507100604.667731-1-lgs201920130244@gmail.com
Signed-off-by: Liu Ying <victor.liu@nxp.com>
2026-05-12 10:13:19 +08:00
..
imx-ldb-helper.c drm/bridge: imx8*-ldb: convert to devm_drm_bridge_alloc() API 2025-04-29 11:21:26 +02:00
imx-ldb-helper.h drm/bridge: imx8*-ldb: convert to devm_drm_bridge_alloc() API 2025-04-29 11:21:26 +02:00
imx-legacy-bridge.c drm/bridge: Include <linux/export.h> 2025-06-16 09:02:25 +02:00
imx8mp-hdmi-pai.c drm/bridge: imx8mp-hdmi-pai: enable PM runtime 2026-02-05 16:16:45 +08:00
imx8mp-hdmi-pvi.c drm/bridge: imx8mp-hdmi-pvi: convert to of_drm_find_and_get_bridge() 2026-01-20 14:53:46 +01:00
imx8mp-hdmi-tx.c drm/bridge: imx: add driver for HDMI TX Parallel Audio Interface 2025-09-29 09:46:04 +08:00
imx8qm-ldb.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
imx8qxp-ldb.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
imx8qxp-pixel-combiner.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
imx8qxp-pixel-link.c drm/bridge: imx8qxp-pixel-link: get/put the next bridge 2026-02-25 10:55:24 +08:00
imx8qxp-pxl2dpi.c drm/bridge: imx8qxp-pxl2dpi: avoid ERR_PTR with device_node cleanup 2026-05-12 10:13:19 +08:00
imx93-mipi-dsi.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
Kconfig drm/bridge: imx: add driver for HDMI TX Parallel Audio Interface 2025-09-29 09:46:04 +08:00
Makefile drm/bridge: imx: add driver for HDMI TX Parallel Audio Interface 2025-09-29 09:46:04 +08:00