* [PATCH] iio: dummy: events: Add missing break
@ 2017-09-29 13:24 Lars-Peter Clausen
2017-10-01 10:17 ` Jonathan Cameron
0 siblings, 1 reply; 2+ messages in thread
From: Lars-Peter Clausen @ 2017-09-29 13:24 UTC (permalink / raw)
To: Jonathan Cameron
Cc: Hartmut Knaack, Peter Meerwald-Stadler, linux-iio,
Lars-Peter Clausen
Add missing break in iio_simple_dummy_write_event_config() for the voltage
threshold event enable attribute. Without this writing to the
in_voltage0_thresh_rising_en always returns -EINVAL even though the change
was correctly applied.
Fixes: 3e34e650db197 ("iio: dummy: Demonstrate the usage of new channel types")
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
drivers/iio/dummy/iio_simple_dummy_events.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/iio/dummy/iio_simple_dummy_events.c b/drivers/iio/dummy/iio_simple_dummy_events.c
index ed63ffd849f8..7ec2a0bb0807 100644
--- a/drivers/iio/dummy/iio_simple_dummy_events.c
+++ b/drivers/iio/dummy/iio_simple_dummy_events.c
@@ -72,6 +72,7 @@ int iio_simple_dummy_write_event_config(struct iio_dev *indio_dev,
st->event_en = state;
else
return -EINVAL;
+ break;
default:
return -EINVAL;
}
--
2.11.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] iio: dummy: events: Add missing break
2017-09-29 13:24 [PATCH] iio: dummy: events: Add missing break Lars-Peter Clausen
@ 2017-10-01 10:17 ` Jonathan Cameron
0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2017-10-01 10:17 UTC (permalink / raw)
To: Lars-Peter Clausen; +Cc: Hartmut Knaack, Peter Meerwald-Stadler, linux-iio
On Fri, 29 Sep 2017 15:24:05 +0200
Lars-Peter Clausen <lars@metafoo.de> wrote:
> Add missing break in iio_simple_dummy_write_event_config() for the voltage
> threshold event enable attribute. Without this writing to the
> in_voltage0_thresh_rising_en always returns -EINVAL even though the change
> was correctly applied.
>
> Fixes: 3e34e650db197 ("iio: dummy: Demonstrate the usage of new channel types")
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Applied to the fixes-togreg branch of iio.git and marked for stable.
It's hardly a critical stable fix, but the risk is obviously very low
as well ;)
Thanks,
Jonathan
> ---
> drivers/iio/dummy/iio_simple_dummy_events.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/iio/dummy/iio_simple_dummy_events.c b/drivers/iio/dummy/iio_simple_dummy_events.c
> index ed63ffd849f8..7ec2a0bb0807 100644
> --- a/drivers/iio/dummy/iio_simple_dummy_events.c
> +++ b/drivers/iio/dummy/iio_simple_dummy_events.c
> @@ -72,6 +72,7 @@ int iio_simple_dummy_write_event_config(struct iio_dev *indio_dev,
> st->event_en = state;
> else
> return -EINVAL;
> + break;
> default:
> return -EINVAL;
> }
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-10-01 10:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-29 13:24 [PATCH] iio: dummy: events: Add missing break Lars-Peter Clausen
2017-10-01 10:17 ` Jonathan Cameron
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.