linux-imx/drivers/hwtracing/coresight
James Clark 0b6bef6202 coresight: Fix ref leak when of_coresight_parse_endpoint() fails
[ Upstream commit 7fcb9cb2fe ]

of_graph_get_next_endpoint() releases the reference to the previous
endpoint on each iteration, but when parsing fails the loop exits
early meaning the last reference is never dropped.

Fix it by dropping the refcount in the exit condition.

Fixes: d375b356e6 ("coresight: Fix support for sparsely populated ports")
Signed-off-by: James Clark <james.clark@arm.com>
Reported-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Link: https://lore.kernel.org/r/20240529133626.90080-1-james.clark@arm.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-08-03 08:53:57 +02:00
..
coresight-catu.c
coresight-catu.h
coresight-cfg-afdo.c
coresight-cfg-preload.c
coresight-cfg-preload.h
coresight-config.c
coresight-config.h
coresight-core.c
coresight-cpu-debug.c
coresight-cti-core.c
coresight-cti-platform.c
coresight-cti-sysfs.c
coresight-cti.h
coresight-dummy.c
coresight-etb10.c
coresight-etm-cp14.c
coresight-etm-perf.c
coresight-etm-perf.h
coresight-etm.h
coresight-etm3x-core.c
coresight-etm3x-sysfs.c
coresight-etm4x-cfg.c
coresight-etm4x-cfg.h
coresight-etm4x-core.c coresight: etm4x: Fix access to resource selector registers 2024-06-12 11:12:22 +02:00
coresight-etm4x-sysfs.c
coresight-etm4x.h coresight: etm4x: Safe access for TRCQCLTR 2024-06-12 11:12:22 +02:00
coresight-funnel.c
coresight-platform.c coresight: Fix ref leak when of_coresight_parse_endpoint() fails 2024-08-03 08:53:57 +02:00
coresight-priv.h
coresight-replicator.c
coresight-self-hosted-trace.h
coresight-stm.c
coresight-syscfg-configfs.c
coresight-syscfg-configfs.h
coresight-syscfg.c
coresight-syscfg.h
coresight-sysfs.c
coresight-tmc-core.c
coresight-tmc-etf.c
coresight-tmc-etr.c
coresight-tmc.h
coresight-tpda.c
coresight-tpda.h
coresight-tpdm.c
coresight-tpdm.h
coresight-tpiu.c
coresight-trace-id.c
coresight-trace-id.h
coresight-trbe.c
coresight-trbe.h
Kconfig
Makefile
ultrasoc-smb.c
ultrasoc-smb.h