[Intel-wired-lan] [PATCH] ice: initialize local variable 'tlv'

G, GurucharanX gurucharanx.g at intel.com
Fri Feb 18 17:06:07 UTC 2022



> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces at osuosl.org> On Behalf Of
> trix at redhat.com
> Sent: Monday, February 14, 2022 9:11 PM
> To: Brandeburg, Jesse <jesse.brandeburg at intel.com>; Nguyen, Anthony L
> <anthony.l.nguyen at intel.com>; davem at davemloft.net; kuba at kernel.org;
> nathan at kernel.org; ndesaulniers at google.com; Greenwalt, Paul
> <paul.greenwalt at intel.com>; Swanson, Evan <evan.swanson at intel.com>
> Cc: netdev at vger.kernel.org; llvm at lists.linux.dev; intel-wired-
> lan at lists.osuosl.org; linux-kernel at vger.kernel.org; Tom Rix
> <trix at redhat.com>
> Subject: [Intel-wired-lan] [PATCH] ice: initialize local variable 'tlv'
> 
> From: Tom Rix <trix at redhat.com>
> 
> Clang static analysis reports this issues
> ice_common.c:5008:21: warning: The left expression of the compound
>   assignment is an uninitialized value. The computed value will
>   also be garbage
>   ldo->phy_type_low |= ((u64)buf << (i * 16));
>   ~~~~~~~~~~~~~~~~~ ^
> 
> When called from ice_cfg_phy_fec() ldo is the unintialized local
> variable tlv.  So initialize.
> 
> Fixes: ea78ce4dab05 ("ice: add link lenient and default override support")
> Signed-off-by: Tom Rix <trix at redhat.com>
> ---
>  drivers/net/ethernet/intel/ice/ice_common.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Tested-by: Gurucharan G <gurucharanx.g at intel.com> (A Contingent worker at Intel)


More information about the Intel-wired-lan mailing list