diff options
Diffstat (limited to 'raiden_debug_spi.c')
-rw-r--r-- | raiden_debug_spi.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/raiden_debug_spi.c b/raiden_debug_spi.c index f67bbe5ec..950b8afb1 100644 --- a/raiden_debug_spi.c +++ b/raiden_debug_spi.c @@ -1579,19 +1579,19 @@ loop_end: (request_enable == RAIDEN_DEBUG_SPI_REQ_ENABLE_EC)) usleep(50 * 1000); - struct spi_master *spi_config = calloc(1, sizeof(struct spi_master)); + struct spi_master *spi_config = calloc(1, sizeof(*spi_config)); if (!spi_config) { msg_perr("Unable to allocate space for SPI master.\n"); return SPI_GENERIC_ERROR; } - struct raiden_debug_spi_data *data = calloc(1, sizeof(struct raiden_debug_spi_data)); + struct raiden_debug_spi_data *data = calloc(1, sizeof(*data)); if (!data) { free(spi_config); msg_perr("Unable to allocate space for extra SPI master data.\n"); return SPI_GENERIC_ERROR; } - memcpy(spi_config, &spi_master_raiden_debug, sizeof(struct spi_master)); + memcpy(spi_config, &spi_master_raiden_debug, sizeof(*spi_config)); data->dev = device; data->in_ep = in_endpoint; |