diff options
author | Cristina Opriceana <cristina.opriceana@gmail.com> | 2015-03-19 21:04:42 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-03-20 13:33:50 +0100 |
commit | 9fb163f49ed3b3836f6835f06a5ef9afbabb9c24 (patch) | |
tree | 40d57db598a386f0954244908487ca49a9eba68d /drivers/staging/iio/magnetometer | |
parent | 2c4b2980ae16a2d8d35f126ddb9fbcba809e2612 (diff) |
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 <cristina.opriceana@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/iio/magnetometer')
-rw-r--r-- | drivers/staging/iio/magnetometer/hmc5843_core.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |