RE: [v20 02/13] rtase: Implement the .ndo_open function

From: Justin Lai
Date: Mon Jun 17 2024 - 11:02:30 EST



> >> How do you think about to increase the application of scope-based resource
> management?
> >> https://elixir.bootlin.com/linux/v6.10-rc3/source/include/linux/clean
> >> up.h#L8
> >
> > Due to our tx and rx each having multiple queues that need to allocate
> > descriptors, if any one of the queues fails to allocate,
> > rtase_alloc_desc() will return an error. Therefore, using 'goto'
> > here rather than directly returning seems to be reasonable.
>
> Some goto chains can be replaced by further usage of advanced cleanup
> techniques, can't they?
>
> Regards,
> Markus

rtase_alloc_desc() is used to allocate DMA memory.
I'd like to ask if it's better to keep our current method?