Skip to content

Commit

Permalink
powerpc/spufs: Fix test in spufs_switch_log_read()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
roel kluin authored and Benjamin Herrenschmidt committed Nov 24, 2009
1 parent d67ebe7 commit 17e3767
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/powerpc/platforms/cell/spufs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 17e3767

Please sign in to comment.