aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2011-12-08 15:22:28 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2011-12-08 15:22:28 -0500
commit106e7cf3bd3e8112d9f36fa8a94cb12042b15bec (patch)
tree0543af47df6296cf44b55db19e92abca9172be53
parent19324328ad202b350c3803aa2bea65ff5f043d7f (diff)
parent5a2a6e1162d2c63b4bb3e6e3c867f0374e95cd1f (diff)
Merge branch 'work-next' into staging-next
-rw-r--r--drivers/staging/iio/industrialio-buffer.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/staging/iio/industrialio-buffer.c b/drivers/staging/iio/industrialio-buffer.c
index 552e33f74769..a03a574965b3 100644
--- a/drivers/staging/iio/industrialio-buffer.c
+++ b/drivers/staging/iio/industrialio-buffer.c
@@ -173,7 +173,7 @@ static ssize_t iio_scan_el_store(struct device *dev,
173error_ret: 173error_ret:
174 mutex_unlock(&indio_dev->mlock); 174 mutex_unlock(&indio_dev->mlock);
175 175
176 return ret ? ret : len; 176 return ret < 0 ? ret : len;
177 177
178} 178}
179 179
@@ -624,16 +624,8 @@ int iio_scan_mask_query(struct iio_dev *indio_dev,
624 624
625 if (!buffer->scan_mask) 625 if (!buffer->scan_mask)
626 return 0; 626 return 0;
627 if (indio_dev->available_scan_masks)
628 mask = iio_scan_mask_match(indio_dev->available_scan_masks,
629 indio_dev->masklength,
630 buffer->scan_mask);
631 else
632 mask = buffer->scan_mask;
633 if (!mask)
634 return 0;
635 627
636 return test_bit(bit, mask); 628 return test_bit(bit, buffer->scan_mask);
637}; 629};
638EXPORT_SYMBOL_GPL(iio_scan_mask_query); 630EXPORT_SYMBOL_GPL(iio_scan_mask_query);
639 631