iio: Remove redundant check that new trigger is different from old
authorPeter Meerwald <pmeerw@pmeerw.net>
Tue, 12 Nov 2013 21:49:00 +0000 (21:49 +0000)
committerJonathan Cameron <jic23@kernel.org>
Sun, 24 Nov 2013 21:07:13 +0000 (21:07 +0000)
same check is performed a new lines above

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/industrialio-trigger.c

index b1b25294e35ddd35b3b8e7fb7b257502f5cacd61..7ba2f002ffcad423527d096703c099b5007d116c 100644 (file)
@@ -356,7 +356,7 @@ static ssize_t iio_trigger_write_current(struct device *dev,
 
        indio_dev->trig = trig;
 
-       if (oldtrig && indio_dev->trig != oldtrig)
+       if (oldtrig)
                iio_trigger_put(oldtrig);
        if (indio_dev->trig)
                iio_trigger_get(indio_dev->trig);