From: Dan Carpenter Date: Fri, 24 May 2024 10:14:02 +0000 (+0300) Subject: Bluetooth: MGMT: Uninitialized variable in load_conn_param() X-Git-Tag: v6.11-rc1~163^2~12^2~49 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=183469bccf68cb05dfb56cc47e73520217854bab;p=thirdparty%2Fkernel%2Flinux.git Bluetooth: MGMT: Uninitialized variable in load_conn_param() 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 Signed-off-by: Luiz Augusto von Dentz --- diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 20eca8a9c681d..3ab1558ff3914 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -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)", ¶m->addr.bdaddr, param->addr.type);