aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2007-08-12 23:22:44 -0400
committerPaul Mackerras <paulus@samba.org>2007-08-15 01:12:44 -0400
commitad941fe4b6b83999863f49dfba7b3d2cebc4ced5 (patch)
treee06978ca055eb77b1a7c1a38af25a5d8ce613091 /arch/powerpc
parent28e8351ac22de25034e048c680014ad824323c65 (diff)
[POWERPC] cell: Fix errno for modular spufs_create with invalid neighbour
At present, spu_create with an invalid neighbo(u)r will return -ENOSYS, not -EBADF, but only when spufs.o is built as a module. This change adds the appropriate errno, making the behaviour the same as the built-in case. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Acked-by: Arnd Bergmann <arnd.bergmann@de.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/platforms/cell/spu_syscalls.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/cell/spu_syscalls.c b/arch/powerpc/platforms/cell/spu_syscalls.c
index dd2c6688c8aa..027ac32cc636 100644
--- a/arch/powerpc/platforms/cell/spu_syscalls.c
+++ b/arch/powerpc/platforms/cell/spu_syscalls.c
@@ -45,6 +45,7 @@ asmlinkage long sys_spu_create(const char __user *name,
45 if (owner && try_module_get(owner)) { 45 if (owner && try_module_get(owner)) {
46 if (flags & SPU_CREATE_AFFINITY_SPU) { 46 if (flags & SPU_CREATE_AFFINITY_SPU) {
47 neighbor = fget_light(neighbor_fd, &fput_needed); 47 neighbor = fget_light(neighbor_fd, &fput_needed);
48 ret = -EBADF;
48 if (neighbor) { 49 if (neighbor) {
49 ret = spufs_calls.create_thread(name, flags, 50 ret = spufs_calls.create_thread(name, flags,
50 mode, neighbor); 51 mode, neighbor);