mirror of
https://github.com/torvalds/linux.git
synced 2024-12-11 05:33:09 +00:00
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>
This commit is contained in:
parent
16d55be4cc
commit
d3f31e87db
@ -50,7 +50,7 @@ static void ad7606_poll_bh_to_ring(struct work_struct *work_s)
|
||||
int ret;
|
||||
|
||||
buf = kzalloc(indio_dev->scan_bytes, GFP_KERNEL);
|
||||
if (buf == NULL)
|
||||
if (!buf)
|
||||
return;
|
||||
|
||||
if (gpio_is_valid(st->pdata->gpio_frstdata)) {
|
||||
|
@ -169,7 +169,7 @@ static int ad7780_probe(struct spi_device *spi)
|
||||
int ret, voltage_uv = 0;
|
||||
|
||||
indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st));
|
||||
if (indio_dev == NULL)
|
||||
if (!indio_dev)
|
||||
return -ENOMEM;
|
||||
|
||||
st = iio_priv(indio_dev);
|
||||
|
Loading…
Reference in New Issue
Block a user