Skip to content
Commit 4dc8f99d authored by Waqar Hameed's avatar Waqar Hameed Committed by Jonathan Cameron
Browse files

iio: Make return value check for set_trigger_state() consistent



In `iio_trigger_detach_poll_func()` the return value from
`trig->ops->set_trigger_state(trig, false)` is checked with `if (ret)`.
However, in `iio_trigger_attach_poll_func()` it is checked with
`if (ret < 0)`. Resolve this mismatch by only checking for `if (ret)` in
both places.

Signed-off-by: default avatarWaqar Hameed <waqar.hameed@axis.com>
Link: https://lore.kernel.org/r/pndv8eojdey.fsf@axis.com
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent b7297d45
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment