diff options
author | Cristina Opriceana <cristina.opriceana@gmail.com> | 2015-03-31 06:04:07 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-04-01 11:23:21 -0400 |
commit | d3f31e87dbcc2c6d3a9cf28e1404cf43ef265ebe (patch) | |
tree | 822a4b66f87961e50f1002e4020ef264240cf20f | |
parent | 16d55be4cc694f76bff0cd99a8101e943e878d38 (diff) |
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: Cristina Opriceana <cristina.opriceana@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/iio/adc/ad7606_ring.c | 2 | ||||
-rw-r--r-- | drivers/staging/iio/adc/ad7780.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/iio/adc/ad7606_ring.c b/drivers/staging/iio/adc/ad7606_ring.c index 3bf174cb19b1..a6f8eb11242c 100644 --- a/drivers/staging/iio/adc/ad7606_ring.c +++ b/drivers/staging/iio/adc/ad7606_ring.c | |||
@@ -50,7 +50,7 @@ static void ad7606_poll_bh_to_ring(struct work_struct *work_s) | |||
50 | int ret; | 50 | int ret; |
51 | 51 | ||
52 | buf = kzalloc(indio_dev->scan_bytes, GFP_KERNEL); | 52 | buf = kzalloc(indio_dev->scan_bytes, GFP_KERNEL); |
53 | if (buf == NULL) | 53 | if (!buf) |
54 | return; | 54 | return; |
55 | 55 | ||
56 | if (gpio_is_valid(st->pdata->gpio_frstdata)) { | 56 | if (gpio_is_valid(st->pdata->gpio_frstdata)) { |
diff --git a/drivers/staging/iio/adc/ad7780.c b/drivers/staging/iio/adc/ad7780.c index 66a157be2eaf..9f03fe3ee3d9 100644 --- a/drivers/staging/iio/adc/ad7780.c +++ b/drivers/staging/iio/adc/ad7780.c | |||
@@ -169,7 +169,7 @@ static int ad7780_probe(struct spi_device *spi) | |||
169 | int ret, voltage_uv = 0; | 169 | int ret, voltage_uv = 0; |
170 | 170 | ||
171 | indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); | 171 | indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); |
172 | if (indio_dev == NULL) | 172 | if (!indio_dev) |
173 | return -ENOMEM; | 173 | return -ENOMEM; |
174 | 174 | ||
175 | st = iio_priv(indio_dev); | 175 | st = iio_priv(indio_dev); |