mirror of
https://github.com/adulau/aha.git
synced 2024-12-29 12:16:20 +00:00
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>
This commit is contained in:
parent
d67ebe72c9
commit
17e3767561
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue