patch "iio: adc: berlin2-adc: Add missing of_node_put() in error path" added to char-misc-linus
Subsystems (2)
This is a note to let you know that I've just added the patch titled
iio: adc: berlin2-adc: Add missing of_node_put() in error path
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 cbd3a0153cd18a2cbef6bf3cf31bb406c3fc9f55 Mon Sep 17 00:00:00 2001
From: Xiongfeng Wang <[email protected]>
Date: Tue, 29 Nov 2022 10:03:16 +0800
Subject: iio: adc: berlin2-adc: Add missing of_node_put() in error path
of_get_parent() will return a device_node pointer with refcount incremented. We need to use of_node_put() on it when done. Add the missing of_node_put() in the error path of berlin2_adc_probe();
--- drivers/iio/adc/berlin2-adc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/iio/adc/berlin2-adc.c +3 -1
@@ -298,8 +298,10 @@ static int berlin2_adc_probe(struct platform_device *pdev)int ret; indio_dev =devm_iio_device_alloc (&pdev->dev,sizeof (*priv)); -if (!indio_dev) +if (!indio_dev) { +of_node_put (parent_np);return -ENOMEM ; + } priv =iio_priv (indio_dev);
Signature · 1 line
2.39.1