Commit e532aa6c authored by Xiongfeng Wang's avatar Xiongfeng Wang Committed by zhaoxiaoqiang11
Browse files

iio: adc: berlin2-adc: Add missing of_node_put() in error path

stable inclusion
from stable-v5.10.168
commit 5602f6a244ab8c80d3c1b860cb5ba056b118d445
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I7URR4

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=5602f6a244ab8c80d3c1b860cb5ba056b118d445



----------------------------------------------------

commit cbd3a015 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: 70f19379 ("iio: adc: add support for Berlin")
Signed-off-by: default avatarXiongfeng Wang <wangxiongfeng2@huawei.com>
Link: https://lore.kernel.org/r/20221129020316.191731-1-wangxiongfeng2@huawei.com


Cc: <Stable@vger.kernel.org>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarzhaoxiaoqiang11 <zhaoxiaoqiang11@jd.com>
parent 1cbb3764
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment