lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210412101904.2054406-1-andy.shevchenko@gmail.com>
Date:   Mon, 12 Apr 2021 13:19:04 +0300
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Jonathan Cameron <Jonathan.Cameron@...wei.com>,
        Cristian Pop <cristian.pop@...log.com>,
        Lars-Peter Clausen <lars@...afoo.de>,
        linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org
Cc:     Michael Hennerich <Michael.Hennerich@...log.com>,
        Jonathan Cameron <jic23@...nel.org>,
        Andy Shevchenko <andy.shevchenko@...il.com>
Subject: [PATCH v1 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 <cristian.pop@...log.com>
Signed-off-by: Andy Shevchenko <andy.shevchenko@...il.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ