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 <shreeya.patel23498@gmail.com>
This commit is contained in:
Shreeya Patel 2020-03-23 20:19:59 +05:30 committed by Liam Girdwood
parent 3b66418a0e
commit 10a72a42a0
1 changed files with 2 additions and 2 deletions

View File

@ -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;