[POWERPC] spufs: check spu_acquire_runnable() return value
authorAkinobu Mita <mita@fixstars.com>
Mon, 23 Apr 2007 19:08:18 +0000 (21:08 +0200)
committerArnd Bergmann <arnd@klappe.arndb.de>
Mon, 23 Apr 2007 19:18:56 +0000 (21:18 +0200)
This patch checks return value of spu_acquire_runnable() in
spufs_mfc_write().

Signed-off-by: Akinobu Mita <mita@fixstars.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
arch/powerpc/platforms/cell/spufs/file.c

index deb340e6e0ae618b40fb826c9a58782217ba0397..525d6b00cba2346d4ede2cf0a3c440bfeed4ffc3 100644 (file)
@@ -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 {