[PATCH v2] coresight: trbe: Return NULL pointer for allocation failures

Markus Elfring Markus.Elfring at web.de
Thu Sep 4 09:10:45 PDT 2025


…
> 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



More information about the linux-arm-kernel mailing list