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

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

Staging: iio: adc: Remove explicit NULL comparison



This patch removes explicit NULL comparison and writes it in its
shorter form. Detected with coccinelle.

Signed-off-by: default avatarCristina Opriceana <cristina.opriceana@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 16d55be4
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -50,7 +50,7 @@ static void ad7606_poll_bh_to_ring(struct work_struct *work_s)
	int ret;
	int ret;


	buf = kzalloc(indio_dev->scan_bytes, GFP_KERNEL);
	buf = kzalloc(indio_dev->scan_bytes, GFP_KERNEL);
	if (buf == NULL)
	if (!buf)
		return;
		return;


	if (gpio_is_valid(st->pdata->gpio_frstdata)) {
	if (gpio_is_valid(st->pdata->gpio_frstdata)) {
+1 −1
Original line number Original line Diff line number Diff line
@@ -169,7 +169,7 @@ static int ad7780_probe(struct spi_device *spi)
	int ret, voltage_uv = 0;
	int ret, voltage_uv = 0;


	indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st));
	indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st));
	if (indio_dev == NULL)
	if (!indio_dev)
		return -ENOMEM;
		return -ENOMEM;


	st = iio_priv(indio_dev);
	st = iio_priv(indio_dev);