summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/boot/oflib.c
diff options
context:
space:
mode:
authorCédric Le Goater <clg@fr.ibm.com>2014-04-24 09:23:29 +0200
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2014-04-28 09:35:39 +0200
commit9cc36bb0aca622539be59266012d8be4346f0996 (patch)
tree613f836ac50d94eeed3723105451789ede639d02 /arch/powerpc/boot/oflib.c
parentpowerpc/boot: Add byteswapping routines in oflib (diff)
downloadlinux-9cc36bb0aca622539be59266012d8be4346f0996.tar.xz
linux-9cc36bb0aca622539be59266012d8be4346f0996.zip
powerpc/boot: Add PROM_ERROR define in oflib
This is mostly useful to make to the boot wrapper code closer with the kernel code in prom_init. Signed-off-by: Cédric Le Goater <clg@fr.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/boot/oflib.c')
-rw-r--r--arch/powerpc/boot/oflib.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/powerpc/boot/oflib.c b/arch/powerpc/boot/oflib.c
index 0f72b1a42133..7f61f2eb5653 100644
--- a/arch/powerpc/boot/oflib.c
+++ b/arch/powerpc/boot/oflib.c
@@ -55,7 +55,7 @@ int of_call_prom(const char *service, int nargs, int nret, ...)
args.args[nargs+i] = 0;
if (prom(&args) < 0)
- return -1;
+ return PROM_ERROR;
return (nret > 0) ? be32_to_cpu(args.args[nargs]) : 0;
}
@@ -80,9 +80,9 @@ static int of_call_prom_ret(const char *service, int nargs, int nret,
args.args[nargs+i] = 0;
if (prom(&args) < 0)
- return -1;
+ return PROM_ERROR;
- if (rets != (void *) 0)
+ if (rets != NULL)
for (i = 1; i < nret; ++i)
rets[i-1] = be32_to_cpu(args.args[nargs+i]);