From aeda3b2d4a6760bda799feeaac391a7bdcdbbdb5 Mon Sep 17 00:00:00 2001 From: Alan Date: Wed, 8 Apr 2015 20:24:43 +0100 Subject: [PATCH] iio: example code is buggy Shock horror, example template code that has never been used in reality is in fact a hazard. This fixes the obvious bug, probably these kind of "examples" should be deleted so real (working) examples are followed. Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman --- drivers/staging/iio/iio_simple_dummy_events.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/iio/iio_simple_dummy_events.c b/drivers/staging/iio/iio_simple_dummy_events.c index a5cd3bb219fe..c32ef78d8e5f 100644 --- a/drivers/staging/iio/iio_simple_dummy_events.c +++ b/drivers/staging/iio/iio_simple_dummy_events.c @@ -84,6 +84,7 @@ int iio_simple_dummy_write_event_config(struct iio_dev *indio_dev, default: return -EINVAL; } + break; case IIO_STEPS: switch (type) { case IIO_EV_TYPE_CHANGE: @@ -92,6 +93,7 @@ int iio_simple_dummy_write_event_config(struct iio_dev *indio_dev, default: return -EINVAL; } + break; default: return -EINVAL; } -- 2.30.2