powerpc/pseries: Improve error code on reconfiguration notifier failure
Reconfiguration notifier call for device node may fail by several reasons, but it always assumes kmalloc failures. This enables reconfiguration notifier call chain to get the actual error code rather than -ENOMEM by converting all reconfiguration notifier calls to return encapsulate error code with notifier_from_errno(). Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:

committed by
Benjamin Herrenschmidt

parent
3aef19f0a1
commit
de2780a3d8
@@ -114,9 +114,7 @@ int pSeries_reconfig_notify(unsigned long action, void *p)
|
||||
int err = blocking_notifier_call_chain(&pSeries_reconfig_chain,
|
||||
action, p);
|
||||
|
||||
if (err == NOTIFY_BAD)
|
||||
return -ENOMEM; /* For now, safe to assume kmalloc failure */
|
||||
return 0;
|
||||
return notifier_to_errno(err);
|
||||
}
|
||||
|
||||
static int pSeries_reconfig_add_node(const char *path, struct property *proplist)
|
||||
|
Reference in New Issue
Block a user