From: Cristina Opriceana Date: Thu, 19 Mar 2015 19:04:42 +0000 (+0200) Subject: Staging: iio: Simplify NULL pointer condition X-Git-Tag: v4.1-rc1~152^2~138^2~302 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=9fb163f49ed3b3836f6835f06a5ef9afbabb9c24;p=karo-tx-linux.git Staging: iio: Simplify NULL pointer condition Replace NULL comparrison with its shorter form. Done with coccinelle: @replace_rule@ expression e; @@ -e == NULL + !e Signed-off-by: Cristina Opriceana Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/iio/magnetometer/hmc5843_core.c b/drivers/staging/iio/magnetometer/hmc5843_core.c index 90cc18b703cf..6befa6f8b2e0 100644 --- a/drivers/staging/iio/magnetometer/hmc5843_core.c +++ b/drivers/staging/iio/magnetometer/hmc5843_core.c @@ -579,7 +579,7 @@ int hmc5843_common_probe(struct device *dev, struct regmap *regmap, int ret; indio_dev = devm_iio_device_alloc(dev, sizeof(*data)); - if (indio_dev == NULL) + if (!indio_dev) return -ENOMEM; dev_set_drvdata(dev, indio_dev);