powerpc/fadump: Return error when fadump registration fails
authorMichal Suchanek <msuchanek@suse.de>
Sat, 27 May 2017 15:46:15 +0000 (17:46 +0200)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 2 Jun 2017 09:23:57 +0000 (19:23 +1000)
commit98b8cd7f75643e0a442d7a4c1cef2c9d53b7e92b
treecefc38c7ab2ff947471592512e9c3ea301c1f914
parentf782ddf297318d544bf71ee1e8afbac8d55f1878
powerpc/fadump: Return error when fadump registration fails

 - log an error message when registration fails and no error code listed
   in the switch is returned
 - translate the hv error code to posix error code and return it from
   fw_register
 - return the posix error code from fw_register to the process writing
   to sysfs
 - return EEXIST on re-registration
 - return success on deregistration when fadump is not registered
 - return ENODEV when no memory is reserved for fadump

Signed-off-by: Michal Suchanek <msuchanek@suse.de>
Tested-by: Hari Bathini <hbathini@linux.vnet.ibm.com>
[mpe: Use pr_err() to shrink the error print]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/kernel/fadump.c