diff options
author | Cristina Opriceana <cristina.opriceana@gmail.com> | 2015-03-19 22:04:42 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-03-20 15:33:50 +0300 |
commit | 9fb163f49ed3b3836f6835f06a5ef9afbabb9c24 (patch) | |
tree | 40d57db598a386f0954244908487ca49a9eba68d /drivers/staging/iio | |
parent | 2c4b2980ae16a2d8d35f126ddb9fbcba809e2612 (diff) | |
download | linux-9fb163f49ed3b3836f6835f06a5ef9afbabb9c24.tar.xz |
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')
-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); |