diff options
| author | Guangshuo Li <lgs201920130244@gmail.com> | 2026-05-07 18:06:03 +0800 |
|---|---|---|
| committer | Liu Ying <victor.liu@nxp.com> | 2026-05-12 10:13:19 +0800 |
| commit | 53597deca0e38c30e6cd4ba2114fa42d2bcd85bb (patch) | |
| tree | 8d78d5da870f698e5af534cb1c502db1e2397bc8 /tools/perf/scripts/python | |
| parent | b2ed01e7ad3de80333e9b962a44024b094bc0b2b (diff) | |
| download | linux-53597deca0e38c30e6cd4ba2114fa42d2bcd85bb.tar.gz linux-53597deca0e38c30e6cd4ba2114fa42d2bcd85bb.zip | |
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: ceea3f7806a10 ("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>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
