summaryrefslogtreecommitdiffstats
path: root/drivers/staging/iio/iio_simple_dummy_events.c
diff options
context:
space:
mode:
authorAlan2015-04-08 21:24:43 +0200
committerGreg Kroah-Hartman2015-04-30 16:57:32 +0200
commitaeda3b2d4a6760bda799feeaac391a7bdcdbbdb5 (patch)
tree337d4142077d7339c13191b90aa9996628b29ab5 /drivers/staging/iio/iio_simple_dummy_events.c
parentstaging: emxx_udc: Remove dead code (diff)
downloadkernel-qcow2-linux-aeda3b2d4a6760bda799feeaac391a7bdcdbbdb5.tar.gz
kernel-qcow2-linux-aeda3b2d4a6760bda799feeaac391a7bdcdbbdb5.tar.xz
kernel-qcow2-linux-aeda3b2d4a6760bda799feeaac391a7bdcdbbdb5.zip
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 <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/iio/iio_simple_dummy_events.c')
-rw-r--r--drivers/staging/iio/iio_simple_dummy_events.c2
1 files changed, 2 insertions, 0 deletions
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;
}