summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Cameron <jic23@kernel.org>2012-06-30 14:55:23 +0200
committerJonathan Cameron <jic23@kernel.org>2012-07-08 21:02:31 +0200
commit7b7627410e2c211f24787f61e6419e16d259aa13 (patch)
tree7c778a1d229fc772b73ddd5df82f69e22a6a9c04
parentstaging:iio:adis16400: Do not return error code in the interrupt handler (diff)
downloadlinux-7b7627410e2c211f24787f61e6419e16d259aa13.tar.xz
linux-7b7627410e2c211f24787f61e6419e16d259aa13.zip
iio: Fix inkern remove incorrect put of device
The device_get is after this point so on error we should not be removing it. Signed-off-by: Jonathan Cameron <jic23@kernel.org>
-rw-r--r--drivers/iio/inkern.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/iio/inkern.c b/drivers/iio/inkern.c
index 9a46ca61ef02..e2aded04996b 100644
--- a/drivers/iio/inkern.c
+++ b/drivers/iio/inkern.c
@@ -193,7 +193,6 @@ struct iio_channel *iio_channel_get_all(const char *name)
c->map->adc_channel_label);
if (chans[mapind].channel == NULL) {
ret = -EINVAL;
- iio_device_put(chans[mapind].indio_dev);
goto error_free_chans;
}
iio_device_get(chans[mapind].indio_dev);