Bluetooth: assign len after null check
len should be assigned after a null check Signed-off-by: Wang Qing <wangqing@vivo.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
This commit is contained in:
Родитель
29fb608396
Коммит
2e8ecb4bbc
|
@ -77,11 +77,12 @@ int mgmt_send_event_skb(unsigned short channel, struct sk_buff *skb, int flag,
|
|||
{
|
||||
struct hci_dev *hdev;
|
||||
struct mgmt_hdr *hdr;
|
||||
int len = skb->len;
|
||||
int len;
|
||||
|
||||
if (!skb)
|
||||
return -EINVAL;
|
||||
|
||||
len = skb->len;
|
||||
hdev = bt_cb(skb)->mgmt.hdev;
|
||||
|
||||
/* Time stamp */
|
||||
|
|
Загрузка…
Ссылка в новой задаче