[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180907003716.57737-30-alexander.levin@microsoft.com>
Date: Fri, 7 Sep 2018 00:37:42 +0000
From: Sasha Levin <Alexander.Levin@...rosoft.com>
To: "stable@...r.kernel.org" <stable@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
CC: "Gustavo A. R. Silva" <gustavo@...eddedor.com>,
"Stable@...r.kernel.org" <Stable@...r.kernel.org>,
Jonathan Cameron <Jonathan.Cameron@...wei.com>,
Sasha Levin <Alexander.Levin@...rosoft.com>
Subject: [PATCH AUTOSEL 4.14 30/67] iio: sca3000: Fix missing return in switch
From: "Gustavo A. R. Silva" <gustavo@...eddedor.com>
[ Upstream commit c5b974bee9d2ceae4c441ae5a01e498c2674e100 ]
The IIO_CHAN_INFO_LOW_PASS_FILTER_3DB_FREQUENCY case is missing a
return and will fall through to the default case and errorenously
return -EINVAL.
Fix this by adding in missing *return ret*.
Fixes: 626f971b5b07 ("staging:iio:accel:sca3000 Add write support to the low pass filter control")
Reported-by: Jonathan Cameron <jic23@...nel.org>
Signed-off-by: Gustavo A. R. Silva <gustavo@...eddedor.com>
Cc: <Stable@...r.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@...wei.com>
Signed-off-by: Sasha Levin <alexander.levin@...rosoft.com>
---
drivers/iio/accel/sca3000.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/iio/accel/sca3000.c b/drivers/iio/accel/sca3000.c
index 565f7d8d3304..f2761b385541 100644
--- a/drivers/iio/accel/sca3000.c
+++ b/drivers/iio/accel/sca3000.c
@@ -797,6 +797,7 @@ static int sca3000_write_raw(struct iio_dev *indio_dev,
mutex_lock(&st->lock);
ret = sca3000_write_3db_freq(st, val);
mutex_unlock(&st->lock);
+ return ret;
default:
return -EINVAL;
}
--
2.17.1
Powered by blists - more mailing lists