RE: [Intel-wired-lan] [PATCH] ice: remove an unneeded NULL check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces@xxxxxxxxxx] On Behalf
> Of Dan Carpenter
> Sent: Friday, October 12, 2018 12:17 AM
> To: Kirsher, Jeffrey T <jeffrey.t.kirsher@xxxxxxxxx>; Ertman, David M
> <david.m.ertman@xxxxxxxxx>
> Cc: kernel-janitors@xxxxxxxxxxxxxxx; intel-wired-lan@xxxxxxxxxxxxxxxx
> Subject: [Intel-wired-lan] [PATCH] ice: remove an unneeded NULL check
> 
> We added a NULL check in commit 072f0c3db9da ("ice: Fix potential null
> pointer issues") but it causes static checker warnings.

Which static checker and with what options?

> 
>     drivers/net/ethernet/intel/ice/ice_switch.c:2145 ice_add_to_vsi_fltr_list()
>     warn: address of 'fm_entry->fltr_info' is non-NULL
> 
> We can just remove it.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> 
> diff --git a/drivers/net/ethernet/intel/ice/ice_switch.c
> b/drivers/net/ethernet/intel/ice/ice_switch.c
> index 33403f39f1b3..a9ef19da6e61 100644
> --- a/drivers/net/ethernet/intel/ice/ice_switch.c
> +++ b/drivers/net/ethernet/intel/ice/ice_switch.c
> @@ -2142,7 +2142,7 @@ ice_add_to_vsi_fltr_list(struct ice_hw *hw, u16
> vsi_handle,
>  		struct ice_fltr_info *fi;
> 
>  		fi = &fm_entry->fltr_info;
> -		if (!fi || !ice_vsi_uses_fltr(fm_entry, vsi_handle))
> +		if (!ice_vsi_uses_fltr(fm_entry, vsi_handle))
>  			continue;
> 
>  		status = ice_add_entry_to_vsi_fltr_list(hw, vsi_handle,
> _______________________________________________
> Intel-wired-lan mailing list
> Intel-wired-lan@xxxxxxxxxx
> https://lists.osuosl.org/mailman/listinfo/intel-wired-lan



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux