[PATCH v3 8/8] coresight: Unify error handling in coresight_register()

Leo Yan leo.yan at arm.com
Mon Feb 9 03:59:27 PST 2026


On Mon, Feb 09, 2026 at 11:28:19AM +0000, Coresight ML wrote:

[...]

> > Probably a better way to clean this up would be to pull out a function for
> > all the stuff that needs to be locked and use guard(). Then do the stuff
> > that doesn't need to be locked after that function. Either way it doesn't
> > look wrong.
> 
> If so, although locking is not a concern, the device_register() failures
> still need to release platform data particularly.  That means we still
> need extra flag (or returned error) to indicate if it is a
> device_register() failure.
> 
> I understand we don't want multiple places for mutex release.  It is
> not bad to keep the "registered" flag and drop this patch.

Think again, I found we still need the refactor for the failure
from etm_perf_add_symlink_sink().  This can be unified to call
coresight_unregister() for error handling.

I will send a new series for review.

Thanks,
Leo



More information about the linux-arm-kernel mailing list