Skip to content

Commit

Permalink
NFC: st-nci: initialize gate_count in st_nci_hci_network_init
Browse files Browse the repository at this point in the history
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: Christophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
  • Loading branch information
cricard13 authored and Samuel Ortiz committed Oct 26, 2015
1 parent 92d108b commit 404b3e5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/nfc/st-nci/se.c
Original file line number Diff line number Diff line change
Expand Up @@ -536,6 +536,7 @@ static int st_nci_hci_network_init(struct nci_dev *ndev)
if (!conn_info)
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,
sizeof(st_nci_gates));

Expand Down

0 comments on commit 404b3e5

Please sign in to comment.