diff options
author | Cristina Opriceana <cristina.opriceana@gmail.com> | 2015-03-31 12:51:10 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-04-01 17:23:20 +0200 |
commit | 025c7da9eeba3a6c77ef9485a4c1c1a797dd7a4e (patch) | |
tree | 51d6606928217a92210dd0986afb8a1900e32f78 /drivers/staging/iio | |
parent | b72eb70209a0aac7651166d3f610ffb57b4c6e5f (diff) | |
download | op-kernel-dev-025c7da9eeba3a6c77ef9485a4c1c1a797dd7a4e.zip op-kernel-dev-025c7da9eeba3a6c77ef9485a4c1c1a797dd7a4e.tar.gz |
Staging: iio: iio_dummy_evgen: Simplify NULL comparison
Remove explicit NULL comparison and write it in its simpler form.
Replacement done with coccinelle:
@replace_rule@
expression e;
@@
-e == NULL
+ !e
Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/iio')
-rw-r--r-- | drivers/staging/iio/iio_dummy_evgen.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/iio/iio_dummy_evgen.c b/drivers/staging/iio/iio_dummy_evgen.c index 59ad5a3..0c9c86d 100644 --- a/drivers/staging/iio/iio_dummy_evgen.c +++ b/drivers/staging/iio/iio_dummy_evgen.c @@ -72,7 +72,7 @@ static int iio_dummy_evgen_create(void) int ret, i; iio_evgen = kzalloc(sizeof(*iio_evgen), GFP_KERNEL); - if (iio_evgen == NULL) + if (!iio_evgen) return -ENOMEM; iio_evgen->base = irq_alloc_descs(-1, 0, IIO_EVENTGEN_NO, 0); @@ -105,7 +105,7 @@ int iio_dummy_evgen_get_irq(void) { int i, ret = 0; - if (iio_evgen == NULL) + if (!iio_evgen) return -ENODEV; mutex_lock(&iio_evgen->lock); |