summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroel kluin <roel.kluin@gmail.com>2009-10-14 05:32:28 +0000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-11-24 14:31:25 +1100
commit17e376756169af818c2e1c230502167cd1571a6c (patch)
tree89d7567eb8fd7d3580b45483292c220b9a5f19b4
parentd67ebe72c9ce525019db9139153b55247d34b0a4 (diff)
powerpc/spufs: Fix test in spufs_switch_log_read()
size_t len cannot be less than 0. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Acked-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
-rw-r--r--arch/powerpc/platforms/cell/spufs/file.c2
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 884e8bcec499..64a4c2d85f7c 100644
--- a/arch/powerpc/platforms/cell/spufs/file.c
+++ b/arch/powerpc/platforms/cell/spufs/file.c
@@ -2494,7 +2494,7 @@ static ssize_t spufs_switch_log_read(struct file *file, char __user *buf,
struct spu_context *ctx = SPUFS_I(inode)->i_ctx;
int error = 0, cnt = 0;
- if (!buf || len < 0)
+ if (!buf)
return -EINVAL;
error = spu_acquire(ctx);