diff options
author | Jonathan Cameron <jic23@kernel.org> | 2012-06-30 08:55:23 -0400 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2012-07-08 15:02:31 -0400 |
commit | 7b7627410e2c211f24787f61e6419e16d259aa13 (patch) | |
tree | 7c778a1d229fc772b73ddd5df82f69e22a6a9c04 /drivers/iio | |
parent | 462c8d27940d1d41f76091544245b0af11b64c81 (diff) |
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>
Diffstat (limited to 'drivers/iio')
-rw-r--r-- | drivers/iio/inkern.c | 1 |
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) | |||
193 | c->map->adc_channel_label); | 193 | c->map->adc_channel_label); |
194 | if (chans[mapind].channel == NULL) { | 194 | if (chans[mapind].channel == NULL) { |
195 | ret = -EINVAL; | 195 | ret = -EINVAL; |
196 | iio_device_put(chans[mapind].indio_dev); | ||
197 | goto error_free_chans; | 196 | goto error_free_chans; |
198 | } | 197 | } |
199 | iio_device_get(chans[mapind].indio_dev); | 198 | iio_device_get(chans[mapind].indio_dev); |