[lvc-project] [PATCH net-next v2] bnx2x: remove redundant NULL-pointer check

Jakub Kicinski kuba at kernel.org
Fri Nov 1 04:32:27 MSK 2024


On Fri, 25 Oct 2024 20:42:03 +0300 Nikita Kiryushin wrote:
> bnx2x_get_vf_config() contains NULL-pointer checks for
> mac_obj and vlan_obj.
> 
> The fields checked are assigned to (after macro expansions):
> 
> mac_obj = &((vf)->vfqs[0].mac_obj);
> vlan_obj = &((vf)->vfqs[0].vlan_obj);
> 
> It is impossible to get NULL for those.
> 
> Remove superfluous NULL-pointer check and associated
> unreachable code to improve readability.

this is an old driver and the 4 saved LoC on the control path
don't seem to justify the review effort needed, anyway, sorry.
-- 
pw-bot: reject



More information about the lvc-project mailing list