Commit 404b3e58 authored by Christophe Ricard's avatar Christophe Ricard Committed by Samuel Ortiz

NFC: st-nci: initialize gate_count in st_nci_hci_network_init

When initializing ndev->hci_dev->init_data, only gates field
was set. gate_count needs to be initialized as well.

Cc: stable@vger.kernel.org
Signed-off-by: default avatarChristophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent 92d108b6
...@@ -536,6 +536,7 @@ static int st_nci_hci_network_init(struct nci_dev *ndev) ...@@ -536,6 +536,7 @@ static int st_nci_hci_network_init(struct nci_dev *ndev)
if (!conn_info) if (!conn_info)
goto free_dest_params; goto free_dest_params;
ndev->hci_dev->init_data.gate_count = ARRAY_SIZE(st_nci_gates);
memcpy(ndev->hci_dev->init_data.gates, st_nci_gates, memcpy(ndev->hci_dev->init_data.gates, st_nci_gates,
sizeof(st_nci_gates)); sizeof(st_nci_gates));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment