| Submitter | roel kluin |
|---|---|
| Date | Oct. 14, 2009, 3:32 p.m. |
| Message ID | <4AD5EF0C.9050603@gmail.com> |
| Download | mbox | patch |
| Permalink | /patch/35981/ |
| State | Accepted |
| Commit | 17e376756169af818c2e1c230502167cd1571a6c |
| Delegated to: | Benjamin Herrenschmidt |
| Headers | show |
Comments
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
Patch
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);