linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iio: Fix inkern remove incorrect put of device
@ 2012-06-30 12:55 Jonathan Cameron
  2012-07-08  9:36 ` Jonathan Cameron
  0 siblings, 1 reply; 2+ messages in thread
From: Jonathan Cameron @ 2012-06-30 12:55 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron

The device_get is after this point so on error we should not be
removing it.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
---
 drivers/iio/inkern.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/iio/inkern.c b/drivers/iio/inkern.c
index 9a46ca6..e2aded0 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);
-- 
1.7.11.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-07-08  9:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-30 12:55 [PATCH] iio: Fix inkern remove incorrect put of device Jonathan Cameron
2012-07-08  9:36 ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).