From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Jonathan Cameron <Jonathan.Cameron@huawei.com>,
Cristian Pop <cristian.pop@analog.com>,
Lars-Peter Clausen <lars@metafoo.de>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Michael Hennerich <Michael.Hennerich@analog.com>,
Jonathan Cameron <jic23@kernel.org>,
Andy Shevchenko <andy.shevchenko@gmail.com>
Subject: [PATCH v1 1/1] iio: adc: ad7768-1: Keep fwnode reference count balanced
Date: Mon, 12 Apr 2021 13:19:04 +0300 [thread overview]
Message-ID: <20210412101904.2054406-1-andy.shevchenko@gmail.com> (raw)
The commit 75ed0be7200d ("iio: adc: ad7768-1: Add channel labels.")
missed the point that loop counter should be put after use. Otherwise
the reference count of it will become unbalanced.
Fixes: 75ed0be7200d ("iio: adc: ad7768-1: Add channel labels.")
Cc: Cristian Pop <cristian.pop@analog.com>
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
---
drivers/iio/adc/ad7768-1.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/iio/adc/ad7768-1.c b/drivers/iio/adc/ad7768-1.c
index c945f1349623..c488bd4bfeba 100644
--- a/drivers/iio/adc/ad7768-1.c
+++ b/drivers/iio/adc/ad7768-1.c
@@ -565,6 +565,7 @@ static int ad7768_set_channel_label(struct iio_dev *indio_dev,
st->labels[crt_ch] = label;
}
+ fwnode_handle_put(fwnode);
return 0;
}
--
2.31.1
next reply other threads:[~2021-04-12 10:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-12 10:19 Andy Shevchenko [this message]
2021-04-12 11:27 ` [PATCH v1 1/1] iio: adc: ad7768-1: Keep fwnode reference count balanced Andy Shevchenko
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=20210412101904.2054406-1-andy.shevchenko@gmail.com \
--to=andy.shevchenko@gmail.com \
--cc=Jonathan.Cameron@huawei.com \
--cc=Michael.Hennerich@analog.com \
--cc=cristian.pop@analog.com \
--cc=jic23@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@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.