From: Jonathan Cameron <jic23@kernel.org>
To: linux-iio@vger.kernel.org
Cc: Jonathan Cameron <jic23@kernel.org>
Subject: [PATCH] iio: Fix inkern remove incorrect put of device
Date: Sat, 30 Jun 2012 13:55:23 +0100 [thread overview]
Message-ID: <1341060923-10311-1-git-send-email-jic23@kernel.org> (raw)
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
next reply other threads:[~2012-06-30 12:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-30 12:55 Jonathan Cameron [this message]
2012-07-08 9:36 ` [PATCH] iio: Fix inkern remove incorrect put of device Jonathan Cameron
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1341060923-10311-1-git-send-email-jic23@kernel.org \
--to=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.