From b5b6e7beb0a0e6fb553af1a18b52f6d835b40951 Mon Sep 17 00:00:00 2001 From: Eva Rachel Retuya Date: Thu, 18 Feb 2016 18:59:39 +0800 Subject: [PATCH] staging: iio: resolver: fix comparison to NULL Remove comparison of spi->dev.platform_data to NULL by replacing it with '!spi->dev.platform_data' as checkpatch suggested: CHECK: Comparison to NULL could be written "!spi->dev.platform_data" Signed-off-by: Eva Rachel Retuya Signed-off-by: Greg Kroah-Hartman --- drivers/staging/iio/resolver/ad2s1210.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/iio/resolver/ad2s1210.c b/drivers/staging/iio/resolver/ad2s1210.c index 477df95af859..6b992634f009 100644 --- a/drivers/staging/iio/resolver/ad2s1210.c +++ b/drivers/staging/iio/resolver/ad2s1210.c @@ -675,7 +675,7 @@ static int ad2s1210_probe(struct spi_device *spi) struct ad2s1210_state *st; int ret; - if (spi->dev.platform_data == NULL) + if (!spi->dev.platform_data) return -EINVAL; indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); -- 2.30.2