From: Alan Date: Wed, 8 Apr 2015 19:24:43 +0000 (+0100) Subject: iio: example code is buggy X-Git-Tag: v4.14-rc1~5163^2~988 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=aeda3b2d4a6760bda799feeaac391a7bdcdbbdb5;p=platform%2Fkernel%2Flinux-rpi.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 a5cd3bb..c32ef78 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; }