NFC: NCI: Fix wrong allocation size in nci_spi_allocate_device()
Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
diff --git a/net/nfc/nci/spi.c b/net/nfc/nci/spi.c
index c7cf37b..b679595 100644
--- a/net/nfc/nci/spi.c
+++ b/net/nfc/nci/spi.c
@@ -150,7 +150,7 @@
if (!supported_protocols)
return NULL;
- ndev = devm_kzalloc(&spi->dev, sizeof(struct nci_dev), GFP_KERNEL);
+ ndev = devm_kzalloc(&spi->dev, sizeof(struct nci_spi_dev), GFP_KERNEL);
if (!ndev)
return NULL;