Commit 749137b4 authored by Rob Herring's avatar Rob Herring Committed by Greg Kroah-Hartman
Browse files

of: Add a helper to free property struct



[ Upstream commit 1c5e3d9b ]

Freeing a property struct is 3 kfree()'s which is duplicated in multiple
spots. Add a helper, __of_prop_free(), and replace all the open coded
cases in the DT code.

Reviewed-by: default avatarSaravana Kannan <saravanak@google.com>
Reviewed-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/20240409-dt-cleanup-free-v2-1-5b419a4af38d@kernel.org


Signed-off-by: default avatarRob Herring <robh@kernel.org>
Stable-dep-of: 80af3745 ("of: dynamic: Fix use after free in of_changeset_add_prop_helper()")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent d3be2b8c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment