aboutsummaryrefslogtreecommitdiffstats
path: root/net/mctp
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2021-08-04 13:15:30 +0100
committerDavid S. Miller <davem@davemloft.net>2021-08-05 10:56:01 +0100
commitdf7ba0eb25edded52b1b3f6bb6ab0c0048a7e0bb (patch)
tree23ea7f9f57a9dc4921953ae41f0ebd73bb16d65e /net/mctp
parentnet: Replace deprecated CPU-hotplug functions. (diff)
downloadlinux-dev-df7ba0eb25edded52b1b3f6bb6ab0c0048a7e0bb.tar.xz
linux-dev-df7ba0eb25edded52b1b3f6bb6ab0c0048a7e0bb.zip
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 <colin.king@canonical.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mctp')
-rw-r--r--net/mctp/af_mctp.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/net/mctp/af_mctp.c b/net/mctp/af_mctp.c
index 84f722d31fd7..a9526ac29dff 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;