Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 025c7da9 authored by Cristina Opriceana's avatar Cristina Opriceana Committed by Greg Kroah-Hartman
Browse files

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: default avatarCristina Opriceana <cristina.opriceana@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b72eb702
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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);