Commit 106e7cf3 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

Merge branch 'work-next' into staging-next

parents 19324328 5a2a6e11
......@@ -173,7 +173,7 @@ static ssize_t iio_scan_el_store(struct device *dev,
error_ret:
mutex_unlock(&indio_dev->mlock);
return ret ? ret : len;
return ret < 0 ? ret : len;
}
......@@ -624,16 +624,8 @@ int iio_scan_mask_query(struct iio_dev *indio_dev,
if (!buffer->scan_mask)
return 0;
if (indio_dev->available_scan_masks)
mask = iio_scan_mask_match(indio_dev->available_scan_masks,
indio_dev->masklength,
buffer->scan_mask);
else
mask = buffer->scan_mask;
if (!mask)
return 0;
return test_bit(bit, mask);
return test_bit(bit, buffer->scan_mask);
};
EXPORT_SYMBOL_GPL(iio_scan_mask_query);
......
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