提交 c5785f9e 编写于 作者: N Nathan Fontenot 提交者: Benjamin Herrenschmidt

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: NNathan Fontenot <nfont@austin.ibm.com>
Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
上级 151a9f4a
......@@ -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;
}
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册