From: Colin Ian King Date: Wed, 4 Aug 2021 12:15:30 +0000 (+0100) Subject: mctp: remove duplicated assignment of pointer hdr X-Git-Tag: v5.15-rc1~157^2~289 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=df7ba0eb25edded52b1b3f6bb6ab0c0048a7e0bb;p=thirdparty%2Fkernel%2Flinux.git mctp: remove duplicated assignment of pointer hdr The pointer hdr is being initialized and also re-assigned with the same value from the call to function mctp_hdr. Static analysis reports that the initializated value is unused. The second assignment is duplicated and can be removed. Addresses-Coverity: ("Unused value"). Signed-off-by: Colin Ian King Signed-off-by: David S. Miller --- diff --git a/net/mctp/af_mctp.c b/net/mctp/af_mctp.c index 84f722d31fd7e..a9526ac29dffe 100644 --- a/net/mctp/af_mctp.c +++ b/net/mctp/af_mctp.c @@ -170,7 +170,6 @@ static int mctp_recvmsg(struct socket *sock, struct msghdr *msg, size_t len, /* TODO: expand mctp_skb_cb for header fields? */ struct mctp_hdr *hdr = mctp_hdr(skb); - hdr = mctp_hdr(skb); addr = msg->msg_name; addr->smctp_family = AF_MCTP; addr->smctp_network = cb->net;