Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Christophe JAILLET and committed by
Marcel Holtmann
088fc633 75f7293a

+1 -1
+1 -1
drivers/bluetooth/hci_nokia.c
··· 520 520 err = skb_pad(skb, 1); 521 521 if (err) 522 522 return err; 523 - skb_put_u8(skb, 0x00); 523 + skb_put(skb, 1); 524 524 } 525 525 526 526 skb_queue_tail(&btdev->txq, skb);