diff options
author | Nathan Fontenot <nfont@austin.ibm.com> | 2009-03-08 20:00:00 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-03-23 22:43:52 -0400 |
commit | c5785f9e1c1c07c791fdc471f5c7fda4a5855b0c (patch) | |
tree | 600677ecb2e0946ce0b440b3178d2090f222c0da /arch/powerpc/platforms/pseries/reconfig.c | |
parent | 151a9f4aef53fb9cc1e192c7d321c1d820232f4a (diff) |
powerpc/pseries: Failed reconfig notifier chain call cleanup
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>
Diffstat (limited to 'arch/powerpc/platforms/pseries/reconfig.c')
-rw-r--r-- | arch/powerpc/platforms/pseries/reconfig.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/pseries/reconfig.c b/arch/powerpc/platforms/pseries/reconfig.c index c591a25b0b0d..b6f1b137d427 100644 --- a/arch/powerpc/platforms/pseries/reconfig.c +++ b/arch/powerpc/platforms/pseries/reconfig.c | |||
@@ -468,9 +468,13 @@ static int do_update_property(char *buf, size_t bufsize) | |||
468 | 468 | ||
469 | rc = blocking_notifier_call_chain(&pSeries_reconfig_chain, | 469 | rc = blocking_notifier_call_chain(&pSeries_reconfig_chain, |
470 | action, value); | 470 | action, value); |
471 | if (rc == NOTIFY_BAD) { | ||
472 | rc = prom_update_property(np, oldprop, newprop); | ||
473 | return -ENOMEM; | ||
474 | } | ||
471 | } | 475 | } |
472 | 476 | ||
473 | return rc; | 477 | return 0; |
474 | } | 478 | } |
475 | 479 | ||
476 | /** | 480 | /** |