Commit af0bd8e2 authored by Dan Carpenter's avatar Dan Carpenter Committed by Luis Henriques

iio: fix some warning messages

commit 231bfe53 upstream.

WARN_ON() only takes a condition argument.  I have changed these to
WARN() instead.
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
Signed-off-by: default avatarLuis Henriques <luis.henriques@canonical.com>
parent d712aa56
...@@ -843,7 +843,7 @@ int iio_scan_mask_set(struct iio_dev *indio_dev, ...@@ -843,7 +843,7 @@ int iio_scan_mask_set(struct iio_dev *indio_dev,
if (trialmask == NULL) if (trialmask == NULL)
return -ENOMEM; return -ENOMEM;
if (!indio_dev->masklength) { if (!indio_dev->masklength) {
WARN_ON("Trying to set scanmask prior to registering buffer\n"); WARN(1, "Trying to set scanmask prior to registering buffer\n");
goto err_invalid_mask; goto err_invalid_mask;
} }
bitmap_copy(trialmask, buffer->scan_mask, indio_dev->masklength); bitmap_copy(trialmask, buffer->scan_mask, indio_dev->masklength);
......
...@@ -612,7 +612,7 @@ int __iio_device_attr_init(struct device_attribute *dev_attr, ...@@ -612,7 +612,7 @@ int __iio_device_attr_init(struct device_attribute *dev_attr,
break; break;
case IIO_SEPARATE: case IIO_SEPARATE:
if (!chan->indexed) { if (!chan->indexed) {
WARN_ON("Differential channels must be indexed\n"); WARN(1, "Differential channels must be indexed\n");
ret = -EINVAL; ret = -EINVAL;
goto error_free_full_postfix; goto error_free_full_postfix;
} }
......
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