NFC: NCI: Fix wrong allocation size in nci_spi_allocate_device()
authorEric Lapuyade <eric.lapuyade@linux.intel.com>
Mon, 2 Sep 2013 10:34:34 +0000 (12:34 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Tue, 24 Sep 2013 23:35:40 +0000 (01:35 +0200)
Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
net/nfc/nci/spi.c

index c7cf37ba729819ab49c22f5b462320f633cdab5c..b6795955432d0545fe4d5a3973bed3f739f66ad7 100644 (file)
@@ -150,7 +150,7 @@ struct nci_spi_dev *nci_spi_allocate_device(struct spi_device *spi,
        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;