提交 0ae8ef67 编写于 作者: L Luiz Augusto von Dentz 提交者: Marcel Holtmann

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: NLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Reported-by: Nkernel test robot <lkp@intel.com>
Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
上级 06752d16
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册