瀏覽代碼

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>
roel kluin 15 年之前
父節點
當前提交
17e3767561
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      arch/powerpc/platforms/cell/spufs/file.c

+ 1 - 1
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);