From: Alan Date: Wed, 8 Apr 2015 19:24:43 +0000 (+0100) Subject: iio: example code is buggy X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=aeda3b2d4a6760bda799feeaac391a7bdcdbbdb5;p=linux-beck.git 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 --- 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; }