iio: adc: ti-ads131e08: add missing fwnode_handle_put() in ads131e08_alloc_channels()
authorJialin Zhang <zhangjialin11@huawei.com>
Tue, 17 May 2022 03:30:20 +0000 (11:30 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Jun 2022 07:03:29 +0000 (09:03 +0200)
commit711591bf1dab25f5887317dcf31fac5b04e7512e
treef77e08794cee0cc542e6ce42e9ab7ac508f86fe1
parentab7bf025cee89db73c649216ddd2bc589c3d3862
iio: adc: ti-ads131e08: add missing fwnode_handle_put() in ads131e08_alloc_channels()

commit 47dcf770abc793f347a65a24c24d550c936f08b0 upstream.

fwnode_handle_put() should be used when terminating
device_for_each_child_node() iteration with break or return to prevent
stale device node references from being left behind.

Fixes: d935eddd2799 ("iio: adc: Add driver for Texas Instruments ADS131E0x ADC family")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Jialin Zhang <zhangjialin11@huawei.com>
Link: https://lore.kernel.org/r/20220517033020.2033324-1-zhangjialin11@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/ti-ads131e08.c