of: dynamic: Move dead property list check into property add/update functions
authorRob Herring <robh@kernel.org>
Fri, 18 Aug 2023 20:41:00 +0000 (15:41 -0500)
committerRob Herring <robh@kernel.org>
Mon, 21 Aug 2023 22:09:57 +0000 (17:09 -0500)
commit6701c2c76a1ed4bb442235204820cfa24e8d5b9c
tree868cae2fbe77c09f7bdcae1794f4bb7ba89f65ed
parent420f0de965a80b7060d23d2c23cddaed4e4ad2eb
of: dynamic: Move dead property list check into property add/update functions

The changeset code checks for a property in the deadprops list when
adding/updating a property, but of_add_property() and
of_update_property() do not. As the users of these functions are pretty
simple, they have not hit this scenario or else the property lists
would get corrupted.

With this there are 3 cases of removing a property from either deadprops
or properties lists, so add a helper to find and remove a matching
property.

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20230801-dt-changeset-fixes-v3-5-5f0410e007dd@kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>
drivers/of/base.c
drivers/of/dynamic.c