net: mana: remove redundant initialization of variable err
Subsystems (5)
PATCH 1/1 net: mana: remove redundant initialization of variable err
From: Colin Ian King <[email protected]>
The variable err is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed
Addresses-Coverity: ("Unused value")
--- drivers/net/ethernet/microsoft/mana/hw_channel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/microsoft/mana/hw_channel.c +1 -1
@@ -55,7 +55,7 @@ static void mana_hwc_handle_resp(struct hw_channel_context *hwc, u32 resp_len, const struct gdma_resp_hdr *resp_msg) {struct hwc_caller_ctx *ctx; -int err = -EPROTO ; +int err;if (!test_bit (resp_msg->response.hwc_msg_id, hwc->inflight_msg_res.map)) {
Signature · 1 line
2.30.2
This patch was applied to netdev/net-next.git (refs/heads/master):
Hello:
This patch was applied to netdev/net-next.git (refs/heads/master):
Quoted 10 lines · On Tue, 20 Apr 2021 13:27:30 +0100 you wrote:
From: Colin Ian King <[email protected]>
The variable err is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed
Addresses-Coverity: ("Unused value")
Signed-off-by Colin Ian King <[email protected]>[...]
Here is the summary with links:
- [next] net: mana: remove redundant initialization of variable err
https://git.kernel.org/netdev/net-next/c/55cdc26a91ac
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html