提交 aeda3b2d 编写于 作者: A Alan 提交者: Greg Kroah-Hartman

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: NAlan Cox <alan@linux.intel.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 94361655
...@@ -84,6 +84,7 @@ int iio_simple_dummy_write_event_config(struct iio_dev *indio_dev, ...@@ -84,6 +84,7 @@ int iio_simple_dummy_write_event_config(struct iio_dev *indio_dev,
default: default:
return -EINVAL; return -EINVAL;
} }
break;
case IIO_STEPS: case IIO_STEPS:
switch (type) { switch (type) {
case IIO_EV_TYPE_CHANGE: case IIO_EV_TYPE_CHANGE:
...@@ -92,6 +93,7 @@ int iio_simple_dummy_write_event_config(struct iio_dev *indio_dev, ...@@ -92,6 +93,7 @@ int iio_simple_dummy_write_event_config(struct iio_dev *indio_dev,
default: default:
return -EINVAL; return -EINVAL;
} }
break;
default: default:
return -EINVAL; return -EINVAL;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册