Bluetooth: hci_nokia: Save a few cycles in 'nokia_enqueue()'
'skb_pad()' a few lines above already initializes the "padded" byte to 0. So there is no need to do it twice. All what is needed is to increase the len of the skb. So 'skb_put(..., 1)' is enough here. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
This commit is contained in:

committad av
Marcel Holtmann

förälder
75f7293ac8
incheckning
088fc633f2
@@ -520,7 +520,7 @@ static int nokia_enqueue(struct hci_uart *hu, struct sk_buff *skb)
|
|||||||
err = skb_pad(skb, 1);
|
err = skb_pad(skb, 1);
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
skb_put_u8(skb, 0x00);
|
skb_put(skb, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
skb_queue_tail(&btdev->txq, skb);
|
skb_queue_tail(&btdev->txq, skb);
|
||||||
|
Referens i nytt ärende
Block a user