diff mbox series

[7/8] iio: adc: ad9467: use the more common !val NULL check

Message ID 20231205-iio-backend-prep-v1-7-7c9bc18d612b@analog.com (mailing list archive)
State Changes Requested
Headers show
Series iio: ad9467 and axi-adc cleanups | expand

Commit Message

Nuno Sa via B4 Relay Dec. 5, 2023, 5:06 p.m. UTC
From: Nuno Sa <nuno.sa@analog.com>

Check !val instead of directing checking for NULL (val == NULL).
No functional changes intended.

Signed-off-by: Nuno Sa <nuno.sa@analog.com>
---
 drivers/iio/adc/ad9467.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

David Lechner Dec. 6, 2023, 11:11 p.m. UTC | #1
On Tue, Dec 5, 2023 at 11:06 AM Nuno Sa via B4 Relay
<devnull+nuno.sa.analog.com@kernel.org> wrote:
>
> From: Nuno Sa <nuno.sa@analog.com>
>
> Check !val instead of directing checking for NULL (val == NULL).
> No functional changes intended.
>
> Signed-off-by: Nuno Sa <nuno.sa@analog.com>
> ---


Reviewed-by: David Lechner <dlechner@baylibre.com>
diff mbox series

Patch

diff --git a/drivers/iio/adc/ad9467.c b/drivers/iio/adc/ad9467.c
index 0d075e6b6248..637823de712f 100644
--- a/drivers/iio/adc/ad9467.c
+++ b/drivers/iio/adc/ad9467.c
@@ -158,7 +158,7 @@  static int ad9467_reg_access(struct adi_axi_adc_conv *conv, unsigned int reg,
 	struct spi_device *spi = st->spi;
 	int ret;
 
-	if (readval == NULL) {
+	if (!readval) {
 		guard(mutex)(&st->lock);
 		ret = ad9467_spi_write(spi, reg, writeval);
 		if (ret)