From 10a72a42a07995e2c441beb4d1551807a4f76a5f Mon Sep 17 00:00:00 2001 From: Shreeya Patel Date: Mon, 23 Mar 2020 20:19:59 +0530 Subject: [PATCH] src: ssi-spi: Use !x instead of NULL comparison If "x" is compared to NULL, use "!x" instead of it, so as to maintain the coding style. Signed-off-by: Shreeya Patel --- src/drivers/dw/ssi-spi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/drivers/dw/ssi-spi.c b/src/drivers/dw/ssi-spi.c index 2acc31808..613f0b14a 100644 --- a/src/drivers/dw/ssi-spi.c +++ b/src/drivers/dw/ssi-spi.c @@ -456,7 +456,7 @@ int spi_probe(struct spi *spi) spi->rx_buffer = rzalloc(SOF_MEM_ZONE_SYS_RUNTIME, 0, SOF_MEM_CAPS_DMA, SPI_BUFFER_SIZE); - if (spi->rx_buffer == NULL) { + if (!spi->rx_buffer) { trace_ipc_error("eSp"); return -ENOMEM; } @@ -464,7 +464,7 @@ int spi_probe(struct spi *spi) spi->tx_buffer = rzalloc(SOF_MEM_ZONE_SYS_RUNTIME, 0, SOF_MEM_CAPS_DMA, SPI_BUFFER_SIZE); spi->buffer_size = SPI_BUFFER_SIZE; - if (spi->tx_buffer == NULL) { + if (!spi->tx_buffer) { rfree(spi->rx_buffer); trace_ipc_error("eSp"); return -ENOMEM;