summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/iio/light/ltr501.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/light/ltr501.c b/drivers/iio/light/ltr501.c
index ca4bf47..280eff1 100644
--- a/drivers/iio/light/ltr501.c
+++ b/drivers/iio/light/ltr501.c
@@ -976,7 +976,7 @@ static int ltr501_write_event_config(struct iio_dev *indio_dev,
int ret;
/* only 1 and 0 are valid inputs */
- if (state != 1 || state != 0)
+ if (state != 1 && state != 0)
return -EINVAL;
switch (chan->type) {
OpenPOWER on IntegriCloud