From: Cristina Opriceana Date: Sat, 14 Mar 2015 18:50:48 +0000 (+0200) Subject: Staging: iio: Remove explicit comparison to NULL X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=6970791fd5683a893bc11bb4722b82d899013465;p=openwrt%2Fstaging%2Fblogic.git 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 --- 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; }