Commit 9fb163f4 authored by Cristina Opriceana's avatar Cristina Opriceana Committed by Greg Kroah-Hartman

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: default avatarCristina Opriceana <cristina.opriceana@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2c4b2980
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment