From d9ecd1f748f2ddb7cc15d56acadbc90b3ce235a9 Mon Sep 17 00:00:00 2001 From: Jacob Keller Date: Mon, 8 Jul 2019 16:12:29 -0700 Subject: [PATCH] fm10k: remove unnecessary variable initializer The err variable in the fm10k_tlv_attr_parse function is initialized with zero. However, the function never reads err without first assigning it from a function call. Remove this unnecessary initialization. This was detected by cppcheck and resolves the following warning produced by that tool: [fm10k_tlv.c:498]: (style) Variable 'err' is assigned a value that is never used. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/fm10k/fm10k_tlv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_tlv.c b/drivers/net/ethernet/intel/fm10k/fm10k_tlv.c index 2a7a40bf2b1c..f4c42a40f934 100644 --- a/drivers/net/ethernet/intel/fm10k/fm10k_tlv.c +++ b/drivers/net/ethernet/intel/fm10k/fm10k_tlv.c @@ -472,7 +472,7 @@ static s32 fm10k_tlv_attr_parse(u32 *attr, u32 **results, const struct fm10k_tlv_attr *tlv_attr) { u32 i, attr_id, offset = 0; - s32 err = 0; + s32 err; u16 len; /* verify pointers are not NULL */ -- 2.30.2