Skip to content

Commit

Permalink
mctp: remove duplicated assignment of pointer hdr
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Colin Ian King authored and davem330 committed Aug 5, 2021
1 parent 372bbdd commit df7ba0e
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion net/mctp/af_mctp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit df7ba0e

Please sign in to comment.