commit 404b3e585b15d7431a0ffa5cf67090569fad88c1 upstream.

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

Signed-off-by: Christophe Ricard <christophe-h.ric...@st.com>
Signed-off-by: Samuel Ortiz <sa...@linux.intel.com>
---
 drivers/nfc/st-nci/st-nci_se.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/nfc/st-nci/st-nci_se.c b/drivers/nfc/st-nci/st-nci_se.c
index 6b21838..de731b2 100644
--- a/drivers/nfc/st-nci/st-nci_se.c
+++ b/drivers/nfc/st-nci/st-nci_se.c
@@ -529,6 +529,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));
 
-- 
2.5.0

--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to