Re: [PATCH net-next] bnx2x: remove redundant NULL-pointer check

From: Nikita Kiryushin
Date: Mon Jul 15 2024 - 09:52:58 EST


I agree, I guess I was meaning to state, that bnx2x_vf_op_prep()
already contains all the needed checks


On 7/13/24 21:29, Simon Horman wrote:
But, FWIIW, I don't think the test on the two lines above is relevant.

bnx2x_vf_op_prep does, conditionally, check that (vf)->vfqs is not NULL.
But if (vf)->vfqs was null in the code you are updating
(and I'm not saying it can be, just if it was),
then neither mac_obj nor vlan_obj would be NULL due to the
layout of struct bnx2x_vf_queue.