diff options
Diffstat (limited to 'arch/powerpc/platforms/cell/spufs/file.c')
-rw-r--r-- | arch/powerpc/platforms/cell/spufs/file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/file.c b/arch/powerpc/platforms/cell/spufs/file.c index 5b8ba6c3aa3c..0ea2361865a2 100644 --- a/arch/powerpc/platforms/cell/spufs/file.c +++ b/arch/powerpc/platforms/cell/spufs/file.c | |||
@@ -385,7 +385,7 @@ static ssize_t spufs_mbox_read(struct file *file, char __user *buf, | |||
385 | udata = (void __user *)buf; | 385 | udata = (void __user *)buf; |
386 | 386 | ||
387 | spu_acquire(ctx); | 387 | spu_acquire(ctx); |
388 | for (count = 0; count <= len; count += 4, udata++) { | 388 | for (count = 0; (count + 4) <= len; count += 4, udata++) { |
389 | int ret; | 389 | int ret; |
390 | ret = ctx->ops->mbox_read(ctx, &mbox_data); | 390 | ret = ctx->ops->mbox_read(ctx, &mbox_data); |
391 | if (ret == 0) | 391 | if (ret == 0) |