From: Nathan Fontenot Date: Mon, 9 Mar 2009 00:00:00 +0000 (+0000) Subject: powerpc/pseries: Failed reconfig notifier chain call cleanup X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c5785f9e1c1c07c791fdc471f5c7fda4a5855b0c;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git 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 Signed-off-by: Benjamin Herrenschmidt --- 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) 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; } /**