This patch removes explicit NULL comparison and replaces it with
its shorter form. Detected with coccinelle.
@replace_rule@
expression e;
@@
-e == NULL
+ !e
Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
        if (!st->rx)
                return -ENOMEM;
        st->tx = kcalloc(ADE7758_MAX_TX, sizeof(*st->tx), GFP_KERNEL);
-       if (st->tx == NULL) {
+       if (!st->tx) {
                ret = -ENOMEM;
                goto error_free_rx;
        }
 
                                                 indio_dev,
                                                 "ade7759_consumer%d",
                                                 indio_dev->id);
-       if (indio_dev->pollfunc == NULL) {
+       if (!indio_dev->pollfunc) {
                ret = -ENOMEM;
                goto error_iio_kfifo_free;
        }
 
        st->trig = iio_trigger_alloc("%s-dev%d",
                                        spi_get_device_id(st->us)->name,
                                        indio_dev->id);
-       if (st->trig == NULL) {
+       if (!st->trig) {
                ret = -ENOMEM;
                goto error_ret;
        }