iio: adc: ad7768-1: Keep fwnode reference count balanced
Subsystems (3)
PATCH 1/1 iio: adc: ad7768-1: Keep fwnode reference count balanced
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 <[email protected]>
Signed-off-by Andy Shevchenko <[email protected]>
--- drivers/iio/adc/ad7768-1.c | 1 + 1 file changed, 1 insertion(+)
drivers/iio/adc/ad7768-1.c +1 -0
@@ -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 ; }
Signature · 1 line
2.31.1
Quoted 3 lines · 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.
Scratch this, I might be not slept enough.
Signature · 2 lines
With Best Regards, Andy Shevchenko