On 10/17/2024 7:16 AM, Simon Horman wrote:
> On Wed, Oct 16, 2024 at 04:06:34PM -0700, Jacob Keller wrote:
>>
>> Not quite. PTR_ERR_OR_ZERO is intended for the case where you are
>> extracting an error from a pointer. This is converting an error into a
>> pointer.
> 
> Yes, silly me.
> 
>> I am not sure what is really expected here. If res is zero, shouldn't we
>> be returning an skb pointer and not NULL?
> 
> Right. I think the whole point of the cited warning is that it highlights
> code that is often buggy. I think I may have tried to address it in the
> past, but if so unsuccessfully. In any case, I do think it would be good to
> dig into this and either fix it properly (or understand why it is correct
> and note that somewhere.
> 

Right. I think we identified the correct fix. This same code was in i40e
and was removed in a better way.

Reply via email to