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:
parent
29fb608396
commit
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 */
|
||||
|
Loading…
Reference in New Issue
Block a user