patch "iio: adc: aspeed: Fix refcount leak in aspeed_adc_set_trim_data" added to char-misc-linus
Subsystems (3)
This is a note to let you know that I've just added the patch titled
iio: adc: aspeed: Fix refcount leak in aspeed_adc_set_trim_data
to my char-misc git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
in the char-misc-linus branch.
The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)
The patch will hopefully also be merged in Linus's tree for the next -rc kernel release.
If you have any questions about this process, please let me know.
From 8a2b6b5687984a010ed094b4f436a2f091987758 Mon Sep 17 00:00:00 2001
From: Miaoqian Lin <[email protected]>
Date: Mon, 16 May 2022 11:52:02 +0400
Subject: iio: adc: aspeed: Fix refcount leak in aspeed_adc_set_trim_data
of_find_node_by_name() returns a node pointer with refcount incremented, we should use of_node_put() on it when done. Add missing of_node_put() to avoid refcount leak.
--- drivers/iio/adc/aspeed_adc.c | 1 + 1 file changed, 1 insertion(+)
drivers/iio/adc/aspeed_adc.c +1 -0
@@ -186,6 +186,7 @@ static int aspeed_adc_set_trim_data(struct iio_dev *indio_dev)return -EOPNOTSUPP ; } scu =syscon_node_to_regmap (syscon); +of_node_put (syscon);if (IS_ERR (scu)) {dev_warn (data->dev,"Failed to get syscon regmap\n" );return -EOPNOTSUPP ;
Signature · 1 line
2.36.1