From: Bárbara Fernandes Date: Fri, 22 Feb 2019 20:31:59 +0000 (-0300) Subject: iio:adc:ad7923: Rewrite comparison to NULL X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=0a39ac29e0701f4957aabc285f5d1d7028094f94;p=linux.git iio:adc:ad7923: Rewrite comparison to NULL Solves checkpath.pl's message: CHECK: Comparison to NULL could be written "!indio_dev" Signed-off-by: Bárbara Fernandes Signed-off-by: Jonathan Cameron --- diff --git a/drivers/iio/adc/ad7923.c b/drivers/iio/adc/ad7923.c index dbece44e26e4c..cb7b854df00c8 100644 --- a/drivers/iio/adc/ad7923.c +++ b/drivers/iio/adc/ad7923.c @@ -272,7 +272,7 @@ static int ad7923_probe(struct spi_device *spi) int ret; indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); - if (indio_dev == NULL) + if (!indio_dev) return -ENOMEM; st = iio_priv(indio_dev);