of: Use scope based of_node_put() cleanups
authorRob Herring <robh@kernel.org>
Tue, 9 Apr 2024 18:59:41 +0000 (13:59 -0500)
committerRob Herring <robh@kernel.org>
Mon, 15 Apr 2024 13:40:40 +0000 (08:40 -0500)
commita5737b21057468d7078477b70314091bbb19c735
treee24d269a968b4e86972becde46245eea0911c3e7
parent40b0f17453fca50165c9d56401be663448e9136c
of: Use scope based of_node_put() cleanups

Use the relatively new scope based of_node_put() cleanup to simplify
function exit handling. Doing so reduces the chances of forgetting an
of_node_put() and simplifies error paths by avoiding the need for goto
statements.

Reviewed-by: Saravana Kannan <saravanak@google.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/20240409-dt-cleanup-free-v2-3-5b419a4af38d@kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>
drivers/of/address.c
drivers/of/property.c