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>
This commit is contained in:
Nathan Fontenot 2009-03-09 00:00:00 +00:00 коммит произвёл Benjamin Herrenschmidt
Родитель 151a9f4aef
Коммит c5785f9e1c
1 изменённых файлов: 5 добавлений и 1 удалений

Просмотреть файл

@ -468,9 +468,13 @@ static int do_update_property(char *buf, size_t bufsize)
rc = blocking_notifier_call_chain(&pSeries_reconfig_chain, rc = blocking_notifier_call_chain(&pSeries_reconfig_chain,
action, value); action, value);
if (rc == NOTIFY_BAD) {
rc = prom_update_property(np, oldprop, newprop);
return -ENOMEM;
}
} }
return rc; return 0;
} }
/** /**