From: Akinobu Mita Date: Mon, 23 Apr 2007 19:08:18 +0000 (+0200) Subject: [POWERPC] spufs: check spu_acquire_runnable() return value X-Git-Tag: v2.6.22-rc1~1109^2~72^2~11 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=577f8f1021f9ee6ef2a98a142652759ec122d27f;p=linux-2.6 [POWERPC] spufs: check spu_acquire_runnable() return value This patch checks return value of spu_acquire_runnable() in spufs_mfc_write(). Signed-off-by: Akinobu Mita Signed-off-by: Christoph Hellwig Signed-off-by: Arnd Bergmann --- diff --git a/arch/powerpc/platforms/cell/spufs/file.c b/arch/powerpc/platforms/cell/spufs/file.c index deb340e6e0..525d6b00cb 100644 --- a/arch/powerpc/platforms/cell/spufs/file.c +++ b/arch/powerpc/platforms/cell/spufs/file.c @@ -1443,7 +1443,10 @@ static ssize_t spufs_mfc_write(struct file *file, const char __user *buffer, if (ret) goto out; - spu_acquire_runnable(ctx, 0); + ret = spu_acquire_runnable(ctx, 0); + if (ret) + goto out; + if (file->f_flags & O_NONBLOCK) { ret = ctx->ops->send_mfc_command(ctx, &cmd); } else {