Message ID | 4AD5EF0C.9050603@gmail.com (mailing list archive) |
---|---|
State | Accepted, archived |
Commit | 17e376756169af818c2e1c230502167cd1571a6c |
Delegated to: | Benjamin Herrenschmidt |
Headers | show |
Roel, > size_t len cannot be less than 0. > > Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Acked-by: Jeremy Kerr <jk@ozlabs.org> Thanks! Jeremy
diff --git a/arch/powerpc/platforms/cell/spufs/file.c b/arch/powerpc/platforms/cell/spufs/file.c index 884e8bc..64a4c2d 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);