* [PATCH] coresight: Break to error handler if connection can't be made
@ 2025-04-02 13:07 James Clark
2025-04-02 14:54 ` Leo Yan
0 siblings, 1 reply; 2+ messages in thread
From: James Clark @ 2025-04-02 13:07 UTC (permalink / raw)
To: Suzuki K Poulose, Mike Leach, James Clark, Alexander Shishkin,
Suzuki.Poulose, dan.carpenter
Cc: coresight, linux-arm-kernel, linux-kernel
Change the return to a break so that the of_node_put()s in the error
handler are hit on failure.
Fixes: 3d4ff657e454 ("coresight: Dynamically add connections")
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/linux-arm-kernel/3b026b3f-2cb2-49ef-aa20-8b14220f5324@stanley.mountain/
Signed-off-by: James Clark <james.clark@linaro.org>
---
drivers/hwtracing/coresight/coresight-platform.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/hwtracing/coresight/coresight-platform.c b/drivers/hwtracing/coresight/coresight-platform.c
index 8192ba3279f0..39851a13ff89 100644
--- a/drivers/hwtracing/coresight/coresight-platform.c
+++ b/drivers/hwtracing/coresight/coresight-platform.c
@@ -267,7 +267,8 @@ static int of_coresight_parse_endpoint(struct device *dev,
new_conn = coresight_add_out_conn(dev, pdata, &conn);
if (IS_ERR_VALUE(new_conn)) {
fwnode_handle_put(conn.dest_fwnode);
- return PTR_ERR(new_conn);
+ ret = PTR_ERR(new_conn);
+ break;
}
/* Connection record updated */
} while (0);
---
base-commit: 5442d22da7dbff3ba8c6720fc6f23ea4934d402d
change-id: 20250402-james-cs-ret-break-fix-ad38103af5f6
Best regards,
--
James Clark <james.clark@linaro.org>
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] coresight: Break to error handler if connection can't be made
2025-04-02 13:07 [PATCH] coresight: Break to error handler if connection can't be made James Clark
@ 2025-04-02 14:54 ` Leo Yan
0 siblings, 0 replies; 2+ messages in thread
From: Leo Yan @ 2025-04-02 14:54 UTC (permalink / raw)
To: James Clark
Cc: Suzuki K Poulose, Mike Leach, Alexander Shishkin, dan.carpenter,
coresight, linux-arm-kernel, linux-kernel
On Wed, Apr 02, 2025 at 02:07:59PM +0100, James Clark wrote:
> Change the return to a break so that the of_node_put()s in the error
> handler are hit on failure.
>
> Fixes: 3d4ff657e454 ("coresight: Dynamically add connections")
> Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
> Closes: https://lore.kernel.org/linux-arm-kernel/3b026b3f-2cb2-49ef-aa20-8b14220f5324@stanley.mountain/
> Signed-off-by: James Clark <james.clark@linaro.org>
Reviewed-by: Leo Yan <leo.yan@arm.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-04-02 14:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-02 13:07 [PATCH] coresight: Break to error handler if connection can't be made James Clark
2025-04-02 14:54 ` Leo Yan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®