提交 21a045e4 编写于 作者: C Christophe JAILLET 提交者: Stefan Schmidt

ieee802154: mcr20a: simplify a bit 'mcr20a_handle_rx_read_buf_complete()'

Use a 'skb_put_data()' variant instead of rewritting it.
The __skb_put_data variant is safe here. It is obvious that the skb can
not overflow. It has just been allocated a few lines above with the same
'len'.
Signed-off-by: NChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: NXue Liu <liuxuenetmail@gmail.com>
Signed-off-by: NStefan Schmidt <stefan@datenfreihafen.org>
上级 7fd25e6f
......@@ -800,7 +800,7 @@ mcr20a_handle_rx_read_buf_complete(void *context)
if (!skb)
return;
memcpy(skb_put(skb, len), lp->rx_buf, len);
__skb_put_data(skb, lp->rx_buf, len);
ieee802154_rx_irqsafe(lp->hw, skb, lp->rx_lqi[0]);
print_hex_dump_debug("mcr20a rx: ", DUMP_PREFIX_OFFSET, 16, 1,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册