Subject: Re: [PATCH net-next] eth: mlx5: avoid iterator use outside of a loop

From: Jakub Kicinski <[email-masked]>
Date: Mon, 17 Apr 2023 12:44:50 -0700

On Sun, 16 Apr 2023 13:17:53 +0300 Leon Romanovsky wrote:
> > -	return mlx5_irq_get_affinity_mask(eq->core.irq);
> > +	WARN_ON_ONCE(1);
> > +	return 0;  
> 
> I would do it without changing last return, but "return ERR_PTR(0);"
> will do the trick too.

Hm, I've not seen ERR_PTR(0) used before. I'll return NULL. 
Looks like callers pass the value to cpumask_first() without checking 
so either way the warning will be followed by a crash 🤷️