Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <cristina.opriceana@gmail.com>
Reviewed-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Cristina Opriceana and committed by
Greg Kroah-Hartman
6970791f 56cc3b62

+2 -2
+1 -1
drivers/staging/iio/frequency/ad9832.c
··· 220 220 } 221 221 222 222 indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); 223 - if (indio_dev == NULL) { 223 + if (!indio_dev) { 224 224 ret = -ENOMEM; 225 225 goto error_disable_reg; 226 226 }
+1 -1
drivers/staging/iio/frequency/ad9834.c
··· 336 336 } 337 337 338 338 indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); 339 - if (indio_dev == NULL) { 339 + if (!indio_dev) { 340 340 ret = -ENOMEM; 341 341 goto error_disable_reg; 342 342 }