aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iio
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert@linux-m68k.org>2015-06-29 09:14:33 +0200
committerJonathan Cameron <jic23@kernel.org>2015-07-19 11:48:17 +0100
commit06b00f99ca8a0ec79f5d428dfb128abd14162c57 (patch)
tree1efa7547d59dd661b75709da975ac19cde3c289c /drivers/iio
parentiio:light:ltr501: fix regmap dependency (diff)
downloadlinux-dev-06b00f99ca8a0ec79f5d428dfb128abd14162c57.tar.xz
linux-dev-06b00f99ca8a0ec79f5d428dfb128abd14162c57.zip
iio: sx9500: Add missing init in sx9500_buffer_pre{en,dis}able()
drivers/iio/proximity/sx9500.c: In function ‘sx9500_buffer_preenable’: drivers/iio/proximity/sx9500.c:682: warning: ‘ret’ may be used uninitialized in this function drivers/iio/proximity/sx9500.c: In function ‘sx9500_buffer_predisable’: drivers/iio/proximity/sx9500.c:706: warning: ‘ret’ may be used uninitialized in this function If active_scan_mask is empty, it will loop once more over all channels, doing nothing. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: Vlad Dogaru <vlad.dogaru@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio')
-rw-r--r--drivers/iio/proximity/sx9500.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/iio/proximity/sx9500.c b/drivers/iio/proximity/sx9500.c
index d260509d6000..3d756bd8c703 100644
--- a/drivers/iio/proximity/sx9500.c
+++ b/drivers/iio/proximity/sx9500.c
@@ -682,7 +682,7 @@ out:
static int sx9500_buffer_preenable(struct iio_dev *indio_dev)
{
struct sx9500_data *data = iio_priv(indio_dev);
- int ret, i;
+ int ret = 0, i;
mutex_lock(&data->mutex);
@@ -706,7 +706,7 @@ static int sx9500_buffer_preenable(struct iio_dev *indio_dev)
static int sx9500_buffer_predisable(struct iio_dev *indio_dev)
{
struct sx9500_data *data = iio_priv(indio_dev);
- int ret, i;
+ int ret = 0, i;
iio_triggered_buffer_predisable(indio_dev);