public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [bug report] Bluetooth: mgmt: Introduce mgmt_alloc_skb and mgmt_send_event_skb
@ 2021-12-09 15:08 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2021-12-09 15:08 UTC (permalink / raw)
  To: luiz.von.dentz; +Cc: linux-bluetooth

Hello Luiz Augusto von Dentz,

This is a semi-automatic email about new static checker warnings.

The patch 8aca46f91c42: "Bluetooth: mgmt: Introduce mgmt_alloc_skb
and mgmt_send_event_skb" from Dec 3, 2021, leads to the following
Smatch complaint:

    net/bluetooth/mgmt_util.c:82 mgmt_send_event_skb()
    warn: variable dereferenced before check 'skb' (see line 80)

net/bluetooth/mgmt_util.c
    79		struct mgmt_hdr *hdr;
    80		int len = skb->len;
                          ^^^^^^^^^
Dereference

    81	
    82		if (!skb)
                    ^^^^
Too late

    83			return -EINVAL;
    84	

regards,
dan carpenter

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-12-09 15:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-09 15:08 [bug report] Bluetooth: mgmt: Introduce mgmt_alloc_skb and mgmt_send_event_skb Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox