]> git.baikalelectronics.ru Git - kernel.git/commit
iio: adc: berlin2-adc: Add missing of_node_put() in error path
authorXiongfeng Wang <wangxiongfeng2@huawei.com>
Tue, 29 Nov 2022 02:03:16 +0000 (10:03 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Feb 2023 10:28:17 +0000 (11:28 +0100)
commit230794614688f5d137065720bf15882652f47737
tree97d6a1605a2f5e1cc59ce9ef16d0f5a9a09c6b51
parent65966c298a5d8d1568523edbe8f0879a75ef3d24
iio: adc: berlin2-adc: Add missing of_node_put() in error path

commit cbd3a0153cd18a2cbef6bf3cf31bb406c3fc9f55 upstream.

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();

Fixes: 9618bf6d5fbf ("iio: adc: add support for Berlin")
Signed-off-by: Xiongfeng Wang <wangxiongfeng2@huawei.com>
Link: https://lore.kernel.org/r/20221129020316.191731-1-wangxiongfeng2@huawei.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iio/adc/berlin2-adc.c