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

Commit 8b298fb7 authored by Fabio Estevam's avatar Fabio Estevam Committed by Jonathan Cameron
Browse files

iio: adc: ad7766: Remove unneeded gpiod NULL check



The gpiod API checks for NULL descriptors, so there is no need to
duplicate the check in the driver.

Signed-off-by: default avatarFabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 50db2cd4
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -103,7 +103,6 @@ static int ad7766_preenable(struct iio_dev *indio_dev)
		return ret;
	}

	if (ad7766->pd_gpio)
	gpiod_set_value(ad7766->pd_gpio, 0);

	return 0;
@@ -113,7 +112,6 @@ static int ad7766_postdisable(struct iio_dev *indio_dev)
{
	struct ad7766 *ad7766 = iio_priv(indio_dev);

	if (ad7766->pd_gpio)
	gpiod_set_value(ad7766->pd_gpio, 1);

	/*