Skip to contentSkip to conversation

net: caif: remove redundant assignment to variable expectlen

PATCH Applied Colin Ian King 2 participants 2 messages Dec 28, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: caif: remove redundant assignment to variable expectlen

Variable expectlen is being assigned a value that is never read, the assignment occurs before a return statement. The assignment is redundant and can be removed.

---
 net/caif/cfserl.c | 1 -
 1 file changed, 1 deletion(-)
net/caif/cfserl.c +0 -1
index 40cd57ad0a0f..aee11c74d3c8 100644
@@ -128,7 +128,6 @@ static int cfserl_receive(struct cflayer *l, struct cfpkt *newpkt)
 				if (pkt != NULL)
 					cfpkt_destroy(pkt);
 				layr->incomplete_frm = NULL;
-				expectlen = 0;
 				spin_unlock(&layr->sync);
 				return -EPROTO;
 			}
Signature · 1 line
2.33.1
#1 lore raw
This patch was applied to netdev/net-next.git (master) by David S. Miller <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (master) by David S. Miller <[email protected]>:

Quoted 8 lines · On Tue, 28 Dec 2021 00:45:42 +0000 you wrote:

Variable expectlen is being assigned a value that is never read, the assignment occurs before a return statement. The assignment is redundant and can be removed.

---
 net/caif/cfserl.c | 1 -
 1 file changed, 1 deletion(-)

Here is the summary with links:
- net: caif: remove redundant assignment to variable expectlen

    https://git.kernel.org/netdev/net-next/c/0f1eae8e565e

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html