Re: [PATCH v2] coresight: trbe: Return NULL pointer for allocation failures
From: Markus Elfring
Date: Thu Sep 04 2025 - 12:11:18 EST
…
> Fix this by returning a NULL pointer from arm_trbe_alloc_buffer() on
> allocation failures. This allows that the callers can properly handle
> the failure.
See also:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.17-rc4#n94
By the way:
* Would you like to improve the exception handling by using a goto chain?
* How do you think about to increase the application of scope-based resource management?
https://elixir.bootlin.com/linux/v6.17-rc4/source/include/linux/slab.h#L476
Regards,
Markus