Skip to contentSkip to conversation

qlcnic: Remove redundant initialization of variable ret

PATCH Applied Colin King 2 participants 2 messages Sep 10, 2021

Subsystems (4)
lore
Share & tools
lore

Colin King

author
#0 lore raw

PATCH 1/1 qlcnic: Remove redundant initialization of variable ret

From: Colin Ian King <[email protected]>

The variable ret is being initialized with a value that is never read, it is being updated later on. The assignment is redundant and can be removed.

Addresses-Coverity: ("Unused value")

---
 drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_init.c +1 -1
index 0a2f34fc8b24..27dffa299ca6 100644
@@ -1354,10 +1354,10 @@ static int qlcnic_83xx_copy_fw_file(struct qlcnic_adapter *adapter)
 	struct qlc_83xx_fw_info *fw_info = adapter->ahw->fw_info;
 	const struct firmware *fw = fw_info->fw;
 	u32 dest, *p_cache, *temp;
-	int i, ret = -EIO;
 	__le32 *temp_le;
 	u8 data[16];
 	size_t size;
+	int i, ret;
 	u64 addr;
 
 	temp = vzalloc(fw->size);
Signature · 1 line
2.32.0
#1 lore raw
This patch was applied to netdev/net.git (refs/heads/master):

Hello:

This patch was applied to netdev/net.git (refs/heads/master):

Quoted 9 lines · On Fri, 10 Sep 2021 12:15:11 +0100 you wrote:

From: Colin Ian King <[email protected]>

The variable ret is being initialized with a value that is never read, it is being updated later on. The assignment is redundant and can be removed.

Addresses-Coverity: ("Unused value")

[...]

Here is the summary with links:
- qlcnic: Remove redundant initialization of variable ret

    https://git.kernel.org/netdev/net/c/666eb96d85dc

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html