Skip to content

Commit

Permalink
powerpc/pseries: Failed reconfig notifier chain call cleanup
Browse files Browse the repository at this point in the history
The return code from invoking the notifier chain when updating the
ibm,dynamic-memory property is not handled properly. In failure
cases (rc == NOTIFY_BAD) we should be restoring the original value
of the property.  In success (rc == NOTIFY_OK) we should be returning
zero from the calling routine.

Signed-off-by: Nathan Fontenot <nfont@austin.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
  • Loading branch information
Nathan Fontenot authored and Benjamin Herrenschmidt committed Mar 24, 2009
1 parent 151a9f4 commit c5785f9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion arch/powerpc/platforms/pseries/reconfig.c
Original file line number Diff line number Diff line change
Expand Up @@ -468,9 +468,13 @@ static int do_update_property(char *buf, size_t bufsize)

rc = blocking_notifier_call_chain(&pSeries_reconfig_chain,
action, value);
if (rc == NOTIFY_BAD) {
rc = prom_update_property(np, oldprop, newprop);
return -ENOMEM;
}
}

return rc;
return 0;
}

/**
Expand Down

0 comments on commit c5785f9

Please sign in to comment.