]> www.infradead.org Git - nvme.git/commitdiff
Bluetooth: MGMT: Uninitialized variable in load_conn_param()
authorDan Carpenter <dan.carpenter@linaro.org>
Fri, 24 May 2024 10:14:02 +0000 (13:14 +0300)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Mon, 15 Jul 2024 01:34:08 +0000 (21:34 -0400)
The "update" variable needs to be initialized to false.

Fixes: 0ece498c27d8 ("Bluetooth: MGMT: Make MGMT_OP_LOAD_CONN_PARAM update existing connection")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
net/bluetooth/mgmt.c

index 20eca8a9c681d8c69e5eec5ee68b4c65739db4f2..3ab1558ff39148057a7972a18b35ce46f35f6bdf 100644 (file)
@@ -7865,8 +7865,8 @@ static int load_conn_param(struct sock *sk, struct hci_dev *hdev, void *data,
                struct mgmt_conn_param *param = &cp->params[i];
                struct hci_conn_params *hci_param;
                u16 min, max, latency, timeout;
+               bool update = false;
                u8 addr_type;
-               bool update;
 
                bt_dev_dbg(hdev, "Adding %pMR (type %u)", &param->addr.bdaddr,
                           param->addr.type);