Subject: [PATCH] spufs: remove redundant test on unsigned

From: Roel Kluin <[email-masked]>
Date: Tue, 23 Jun 2009 00:20:29 +0200

Unsigned `len' cannot be less than 0.

Signed-off-by: Roel Kluin <[email-masked]>
---
Or should it be `if (!buf || len > MAX)' and what should MAX be then?

diff --git a/arch/powerpc/platforms/cell/spufs/sputrace.c b/arch/powerpc/platforms/cell/spufs/sputrace.c
index d0b1f3f..8f799ee 100644
--- a/arch/powerpc/platforms/cell/spufs/sputrace.c
+++ b/arch/powerpc/platforms/cell/spufs/sputrace.c
@@ -73,7 +73,7 @@ static ssize_t sputrace_read(struct file *file, char __user *buf,
 {
 	int error = 0, cnt = 0;
 
-	if (!buf || len < 0)
+	if (!buf)
 		return -EINVAL;
 
 	while (cnt < len) {