On Tue, Jul 04, 2017 at 03:56:09PM +0200, Alexander Steffen wrote: > struct tpm_tis_spi_phy { > struct tpm_tis_data priv; > struct spi_device *spi_device; > - > - u8 tx_buf[4]; > - u8 rx_buf[4]; > + u8 *iobuf;
tpm_tis_spi_phy is already devm_kzalloc'd, why embed another kalloc pointer inside it? > + phy->iobuf = devm_kmalloc(&dev->dev, MAX_SPI_FRAMESIZE, GFP_KERNEL); > + if (!phy->iobuf) > + return -ENOMEM; Just do: struct tpm_tis_spi_phy { struct tpm_tis_data priv; struct spi_device *spi_device; u64 iobuf[MAX_SPI_FRAMESIZE/8]; Jason ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ tpmdd-devel mailing list tpmdd-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tpmdd-devel