mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
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>
This commit is contained in:
parent
2c4b2980ae
commit
9fb163f49e
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue