On Wed, May 20, 2026 at 05:17:03PM -0700, Jakub Kicinski wrote:
> On Mon, 18 May 2026 12:43:51 -0700 Dipayaan Roy wrote:
> > +   /* If already detached (indicates detach succeeded but attach failed
> > +    * previously). Now skip mana detach and just retry mana_attach.
> > +    */
> > +   if (!netif_device_present(ndev))
> > +           goto attach;
> > +
> >     err = mana_detach(ndev, false);
> >     if (err) {
> >             netdev_err(ndev, "mana_detach failed: %d\n", err);
> >             goto dealloc_pre_rxbufs;
> >     }
> >  
> > +attach:
> 
> goto's are acceptable for error unwinding, not to jump around 
> a function seemingly to avoid indenting something. Please use
> normal constructs or perhaps move the netif_device_present()
> into mana_detach() as an early exit condition? 
>

Hi Jakub,

Thanks for the suggestions, Moving netif_device_present() into mana_detach
as an early exit, is a better option and will cover all cases. I will send
v2 with the suggestion.

Regards
Dipayaan Roy
 
> >     err = mana_attach(ndev);

Reply via email to