Commit 2af84932 authored by Marc Kleine-Budde's avatar Marc Kleine-Budde

can: raw: raw_sendmsg(): remove not needed setting of skb->sk

The skb in raw_sendmsg() is allocated with sock_alloc_send_skb(),
which subsequently calls sock_alloc_send_pskb() -> skb_set_owner_w(),
which assigns "skb->sk = sk".

This patch removes the not needed setting of skb->sk.

Link: https://lore.kernel.org/all/20220502091946.1916211-2-mkl@pengutronix.deAcked-by: default avatarOliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
parent d887ae32
...@@ -820,7 +820,6 @@ static int raw_sendmsg(struct socket *sock, struct msghdr *msg, size_t size) ...@@ -820,7 +820,6 @@ static int raw_sendmsg(struct socket *sock, struct msghdr *msg, size_t size)
skb_setup_tx_timestamp(skb, sk->sk_tsflags); skb_setup_tx_timestamp(skb, sk->sk_tsflags);
skb->dev = dev; skb->dev = dev;
skb->sk = sk;
skb->priority = sk->sk_priority; skb->priority = sk->sk_priority;
err = can_send(skb, ro->loopback); err = can_send(skb, ro->loopback);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment