From 6970791fd5683a893bc11bb4722b82d899013465 Mon Sep 17 00:00:00 2001 From: Cristina Opriceana Date: Sat, 14 Mar 2015 20:50:48 +0200 Subject: [PATCH] Staging: iio: Remove explicit comparison to NULL This patch simplifies pointer comparison to NULL and makes code easier to read. Warning found by checkpatch.pl. Signed-off-by: Cristina Opriceana Reviewed-by: Daniel Baluta Signed-off-by: Greg Kroah-Hartman --- drivers/staging/iio/frequency/ad9832.c | 2 +- drivers/staging/iio/frequency/ad9834.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/iio/frequency/ad9832.c b/drivers/staging/iio/frequency/ad9832.c index 9a16699541c2..8ecc0bc64ee3 100644 --- a/drivers/staging/iio/frequency/ad9832.c +++ b/drivers/staging/iio/frequency/ad9832.c @@ -220,7 +220,7 @@ static int ad9832_probe(struct spi_device *spi) } indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); - if (indio_dev == NULL) { + if (!indio_dev) { ret = -ENOMEM; goto error_disable_reg; } diff --git a/drivers/staging/iio/frequency/ad9834.c b/drivers/staging/iio/frequency/ad9834.c index a34667306320..efea56012622 100644 --- a/drivers/staging/iio/frequency/ad9834.c +++ b/drivers/staging/iio/frequency/ad9834.c @@ -336,7 +336,7 @@ static int ad9834_probe(struct spi_device *spi) } indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); - if (indio_dev == NULL) { + if (!indio_dev) { ret = -ENOMEM; goto error_disable_reg; } -- 2.39.5