Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 062f782b authored by Cristina Moraru's avatar Cristina Moraru Committed by Greg Kroah-Hartman
Browse files

staging: iio: meter: Remove explicit comparisons



Remove comparisons to 0 or NULL

Signed-off-by: default avatarCristina Moraru <cristina.moraru09@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d59b7b68
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -406,7 +406,7 @@ static ssize_t ade7753_write_frequency(struct device *dev,
	ret = kstrtou16(buf, 10, &val);
	if (ret)
		return ret;
	if (val == 0)
	if (!val)
		return -EINVAL;

	mutex_lock(&indio_dev->mlock);
+1 −1
Original line number Diff line number Diff line
@@ -438,7 +438,7 @@ static ssize_t ade7754_write_frequency(struct device *dev,
	ret = kstrtou16(buf, 10, &val);
	if (ret)
		return ret;
	if (val == 0)
	if (!val)
		return -EINVAL;

	mutex_lock(&indio_dev->mlock);
+1 −1
Original line number Diff line number Diff line
@@ -377,7 +377,7 @@ static ssize_t ade7759_write_frequency(struct device *dev,
	ret = kstrtou16(buf, 10, &val);
	if (ret)
		return ret;
	if (val == 0)
	if (!val)
		return -EINVAL;

	mutex_lock(&indio_dev->mlock);
+1 −1
Original line number Diff line number Diff line
@@ -278,7 +278,7 @@ static int ade7854_spi_probe(struct spi_device *spi)
	struct iio_dev *indio_dev;

	indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st));
	if (indio_dev == NULL)
	if (!indio_dev)
		return -ENOMEM;
	st = iio_priv(indio_dev);
	spi_set_drvdata(spi, indio_dev);