Skip to content

Commit b9c4385

Browse files
pantoniourobherring
authored andcommitted
of: dynamic: changeset prop-update revert fix
When reverting an update property changeset entry that created a property the reverse operation is a remove property and not an update. Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com> Signed-off-by: Rob Herring <robh@kernel.org>
1 parent bb91f92 commit b9c4385

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎drivers/of/dynamic.c‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -498,6 +498,11 @@ static void __of_changeset_entry_invert(struct of_changeset_entry *ce,
498498
case OF_RECONFIG_UPDATE_PROPERTY:
499499
rce->old_prop = ce->prop;
500500
rce->prop = ce->old_prop;
501+
/* update was used but original property did not exist */
502+
if (!rce->prop) {
503+
rce->action = OF_RECONFIG_REMOVE_PROPERTY;
504+
rce->prop = ce->prop;
505+
}
501506
break;
502507
}
503508
}

0 commit comments

Comments
 (0)