Commit 13ba4c43 authored by Marc Kleine-Budde's avatar Marc Kleine-Budde

net: j1939: j1939_session_fresh_new(): fix missing initialization of skbcnt

This patch add the initialization of skbcnt, similar to:

    e009f95b can: j1935: j1939_tp_tx_dat_new(): fix missing initialization of skbcnt

Let's play save and initialize this skbcnt as well.
Suggested-by: default avatarJakub Kicinski <kuba@kernel.org>
Fixes: 9d71dd0c ("can: add support of SAE J1939 protocol")
Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
parent e009f95b
...@@ -1488,6 +1488,7 @@ j1939_session *j1939_session_fresh_new(struct j1939_priv *priv, ...@@ -1488,6 +1488,7 @@ j1939_session *j1939_session_fresh_new(struct j1939_priv *priv,
skb->dev = priv->ndev; skb->dev = priv->ndev;
can_skb_reserve(skb); can_skb_reserve(skb);
can_skb_prv(skb)->ifindex = priv->ndev->ifindex; can_skb_prv(skb)->ifindex = priv->ndev->ifindex;
can_skb_prv(skb)->skbcnt = 0;
skcb = j1939_skb_to_cb(skb); skcb = j1939_skb_to_cb(skb);
memcpy(skcb, rel_skcb, sizeof(*skcb)); memcpy(skcb, rel_skcb, sizeof(*skcb));
......
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