iio: dummy: events: Add missing break
authorLars-Peter Clausen <lars@metafoo.de>
Fri, 29 Sep 2017 13:24:05 +0000 (15:24 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 1 Oct 2017 10:17:18 +0000 (11:17 +0100)
Add missing break in iio_simple_dummy_write_event_config() for the voltage
threshold event enable attribute. Without this writing to the
in_voltage0_thresh_rising_en always returns -EINVAL even though the change
was correctly applied.

Fixes: 3e34e650db197 ("iio: dummy: Demonstrate the usage of new channel types")
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/dummy/iio_simple_dummy_events.c

index ed63ffd849f8201505499d2be4594572b09b535d..7ec2a0bb08076ffa4ffefaf50cc0336471553756 100644 (file)
@@ -72,6 +72,7 @@ int iio_simple_dummy_write_event_config(struct iio_dev *indio_dev,
                                st->event_en = state;
                        else
                                return -EINVAL;
+                       break;
                default:
                        return -EINVAL;
                }