aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2013-06-04 10:44:00 -0400
committerJonathan Cameron <jic23@kernel.org>2013-06-04 13:28:21 -0400
commite916b80d2b1988e985abc0a1c85eca5b96c61f48 (patch)
tree33989028ad270fed5a1b6d3e4e2c864d77bac21a
parent702df9f1819c7fc7e257251fabc5eec674342c32 (diff)
inkern: iio_device_put after incorrect return/goto
The code uses return foo; goto err_type; when instead the form should have been ret = foo; goto err_type; Here this causes a useful iio_device_put to be skipped. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
-rw-r--r--drivers/iio/inkern.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/inkern.c b/drivers/iio/inkern.c
index 795d100b4c36..dca4eed7b034 100644
--- a/drivers/iio/inkern.c
+++ b/drivers/iio/inkern.c
@@ -124,7 +124,7 @@ static int __of_iio_channel_get(struct iio_channel *channel,
124 channel->indio_dev = indio_dev; 124 channel->indio_dev = indio_dev;
125 index = iiospec.args_count ? iiospec.args[0] : 0; 125 index = iiospec.args_count ? iiospec.args[0] : 0;
126 if (index >= indio_dev->num_channels) { 126 if (index >= indio_dev->num_channels) {
127 return -EINVAL; 127 err = -EINVAL;
128 goto err_put; 128 goto err_put;
129 } 129 }
130 channel->channel = &indio_dev->channels[index]; 130 channel->channel = &indio_dev->channels[index];