mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-10 07:10:27 +00:00
Bluetooth: SMP: Fix variable dereferenced before check 'conn'
This fixes kbuild findings: smatch warnings: net/bluetooth/smp.c:1633 smp_user_confirm_reply() warn: variable dereferenced before check 'conn' (see line 1631) Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> Reported-by: kernel test robot <lkp@intel.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
This commit is contained in:
parent
06752d1678
commit
0ae8ef674e
@ -1628,11 +1628,11 @@ int smp_user_confirm_reply(struct hci_conn *hcon, u16 mgmt_op, __le32 passkey)
|
||||
u32 value;
|
||||
int err;
|
||||
|
||||
bt_dev_dbg(conn->hcon->hdev, "");
|
||||
|
||||
if (!conn)
|
||||
return -ENOTCONN;
|
||||
|
||||
bt_dev_dbg(conn->hcon->hdev, "");
|
||||
|
||||
chan = conn->smp;
|
||||
if (!chan)
|
||||
return -ENOTCONN;
|
||||
|
Loading…
x
Reference in New Issue
Block a user