powerpc: Check rc of notifier chain for memory remove
authorNathan Fontenot <nfont@austin.ibm.com>
Mon, 25 Aug 2008 19:33:34 +0000 (05:33 +1000)
committerPaul Mackerras <paulus@samba.org>
Mon, 15 Sep 2008 18:07:52 +0000 (11:07 -0700)
The return code from invocation of the notifier for
pSeries_reconfig_chain during update of the device tree is not
checked.  This causes writes to /proc/ppc64/ofdt to update memory
properties (i.e. ibm,dyamic-reconfiguration-memory) to always
return success, instead of the result of the notifier chain.

This happens specifically when we remove/add memory from the
device tree on machines using memory specified in the
ibm,dynamic-reconfiguration-memory property of the device tree.

Signed-off-by: Nathan Fontenot <nfont@austin.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/platforms/pseries/reconfig.c

index 7637bd38c7957d77d50d01c5f70a8597f3a4ddad..c591a25b0b0d816d7e3f3c206c205ece673ea871 100644 (file)
@@ -466,11 +466,11 @@ static int do_update_property(char *buf, size_t bufsize)
                else
                        action = PSERIES_DRCONF_MEM_REMOVE;
 
-               blocking_notifier_call_chain(&pSeries_reconfig_chain,
-                                            action, value);
+               rc = blocking_notifier_call_chain(&pSeries_reconfig_chain,
+                                                 action, value);
        }
 
-       return 0;
+       return rc;
 }
 
 /**