* [PATCH v1 1/1] iio: adc: ad7768-1: Keep fwnode reference count balanced
@ 2021-04-12 10:19 Andy Shevchenko
2021-04-12 11:27 ` Andy Shevchenko
0 siblings, 1 reply; 2+ messages in thread
From: Andy Shevchenko @ 2021-04-12 10:19 UTC (permalink / raw)
To: Jonathan Cameron, Cristian Pop, Lars-Peter Clausen, linux-iio,
linux-kernel
Cc: Michael Hennerich, Jonathan Cameron, Andy Shevchenko
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v1 1/1] iio: adc: ad7768-1: Keep fwnode reference count balanced
2021-04-12 10:19 [PATCH v1 1/1] iio: adc: ad7768-1: Keep fwnode reference count balanced Andy Shevchenko
@ 2021-04-12 11:27 ` Andy Shevchenko
0 siblings, 0 replies; 2+ messages in thread
From: Andy Shevchenko @ 2021-04-12 11:27 UTC (permalink / raw)
To: Jonathan Cameron, Cristian Pop, Lars-Peter Clausen, linux-iio,
linux-kernel
Cc: Michael Hennerich, Jonathan Cameron
On Mon, Apr 12, 2021 at 01:19:04PM +0300, Andy Shevchenko wrote:
> 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.
Scratch this, I might be not slept enough.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-04-12 11:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-12 10:19 [PATCH v1 1/1] iio: adc: ad7768-1: Keep fwnode reference count balanced Andy Shevchenko
2021-04-12 11:27 ` Andy Shevchenko
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.