of: property: decrement node refcount in of_fwnode_get_reference_args()
stable inclusion from stable-v4.19.268 commit 171d5fcca1e38b719bfe9b05cf0675f37e1c9d86 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I69KBO CVE: NA -------------------------------- [ Upstream commit 60d865bd ] In of_fwnode_get_reference_args(), the refcount of of_args.np has been incremented in the case of successful return from of_parse_phandle_with_args() or of_parse_phandle_with_fixed_args(). Decrement the refcount if of_args is not returned to the caller of of_fwnode_get_reference_args(). Fixes: 3e3119d3 ("device property: Introduce fwnode_property_get_reference_args") Signed-off-by: NYang Yingliang <yangyingliang@huawei.com> Reviewed-by: NSakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: NFrank Rowand <frowand.list@gmail.com> Link: https://lore.kernel.org/r/20221121023209.3909759-1-yangyingliang@huawei.comSigned-off-by: NRob Herring <robh@kernel.org> Signed-off-by: NSasha Levin <sashal@kernel.org> Signed-off-by: NYongqiang Liu <liuyongqiang13@huawei.com>
Showing
想要评论请 注册 或 登录