Skip to content

Commit

Permalink
iio: adc: ad9467: use the more common !val NULL check
Browse files Browse the repository at this point in the history
Check !val instead of directing checking for NULL (val == NULL).
No functional changes intended.

Reviewed-by: David Lechner <dlechner@baylibre.com>
Signed-off-by: Nuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20231207-iio-backend-prep-v2-7-a4a33bc4d70e@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
  • Loading branch information
Nuno Sa authored and Jonathan Cameron committed Dec 10, 2023
1 parent 6dd3fa9 commit 8bdfa4a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/iio/adc/ad9467.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 8bdfa4a

Please sign in to comment.