Skip to content

Commit

Permalink
iio: Fix inkern remove incorrect put of device
Browse files Browse the repository at this point in the history
The device_get is after this point so on error we should not be
removing it.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
  • Loading branch information
Jonathan Cameron committed Jul 8, 2012
1 parent 462c8d2 commit 7b76274
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/iio/inkern.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 7b76274

Please sign in to comment.