Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Staging: iio: impedance-analyzer: Remove explicit NULL comparison

This patch removes explicit NULL comparison and replaces it with
its shorter form. Detected with coccinelle.

Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Cristina Opriceana and committed by
Greg Kroah-Hartman
16d55be4 e84d0724

+1 -1
+1 -1
drivers/staging/iio/impedance-analyzer/ad5933.c
··· 703 703 struct iio_dev *indio_dev; 704 704 705 705 indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*st)); 706 - if (indio_dev == NULL) 706 + if (!indio_dev) 707 707 return -ENOMEM; 708 708 709 709 st = iio_priv(indio_dev);