diff options
author | Akinobu Mita <mita@fixstars.com> | 2007-04-23 23:08:18 +0400 |
---|---|---|
committer | Arnd Bergmann <arnd@klappe.arndb.de> | 2007-04-23 23:18:56 +0400 |
commit | 577f8f1021f9ee6ef2a98a142652759ec122d27f (patch) | |
tree | 4d83409765bca551223ead236733e69d6998a111 | |
parent | e45d48a34d4d1862d28d22c2533b8c6bb83b8c1f (diff) | |
download | linux-577f8f1021f9ee6ef2a98a142652759ec122d27f.tar.xz |
[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 <mita@fixstars.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
-rw-r--r-- | arch/powerpc/platforms/cell/spufs/file.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/file.c b/arch/powerpc/platforms/cell/spufs/file.c index deb340e6e0ae..525d6b00cba2 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 { |