From: Gustavo A. R. Silva Date: Sat, 7 Jul 2018 17:44:01 +0000 (-0500) Subject: iio: sca3000: Fix missing return in switch X-Git-Tag: v4.19~371^2~310^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c5b974bee9d2ceae4c441ae5a01e498c2674e100;p=platform%2Fkernel%2Flinux-rpi.git iio: sca3000: Fix missing return in switch 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 Signed-off-by: Gustavo A. R. Silva Cc: Signed-off-by: Jonathan Cameron --- diff --git a/drivers/iio/accel/sca3000.c b/drivers/iio/accel/sca3000.c index 4dceb75..4964561 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; }