From: Jeremy Kerr Date: Mon, 13 Aug 2007 03:22:44 +0000 (+1000) Subject: [POWERPC] cell: Fix errno for modular spufs_create with invalid neighbour X-Git-Tag: MMI-PSA29.97-13-9~40059^2~395 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ad941fe4b6b83999863f49dfba7b3d2cebc4ced5;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git [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 Acked-by: Arnd Bergmann Signed-off-by: Paul Mackerras --- 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, if (owner && try_module_get(owner)) { if (flags & SPU_CREATE_AFFINITY_SPU) { neighbor = fget_light(neighbor_fd, &fput_needed); + ret = -EBADF; if (neighbor) { ret = spufs_calls.create_thread(name, flags, mode, neighbor);