Skip to content

Commit

Permalink
Bluetooth: MGMT: Uninitialized variable in load_conn_param()
Browse files Browse the repository at this point in the history
The "update" variable needs to be initialized to false.

Fixes: 0ece498 ("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>
  • Loading branch information
Dan Carpenter authored and Luiz Augusto von Dentz committed Jul 15, 2024
1 parent fbcd149 commit 183469b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/bluetooth/mgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 183469b

Please sign in to comment.