[patch 1/1] powerpc: Sky CPU: redundant or incorrect tests on unsigned
akpm at linux-foundation.org
akpm at linux-foundation.org
Sat Sep 19 05:46:14 EST 2009
From: Roel Kluin <roel.kluin at gmail.com>
count is unsigned and cannot be less than 0.
Signed-off-by: Roel Kluin <roel.kluin at gmail.com>
Acked-by: Cyrill Gorcunov <gorcunov at gmail.com>
Cc: Benjamin Herrenschmidt <benh at kernel.crashing.org>
Cc: Kumar Gala <galak at gate.crashing.org>
Cc: Brian Waite <waite at skycomputers.com>
Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
---
drivers/misc/hdpuftrs/hdpu_cpustate.c | 5 -----
1 file changed, 5 deletions(-)
diff -puN drivers/misc/hdpuftrs/hdpu_cpustate.c~powerpc-sky-cpu-redundant-or-incorrect-tests-on-unsigned drivers/misc/hdpuftrs/hdpu_cpustate.c
--- a/drivers/misc/hdpuftrs/hdpu_cpustate.c~powerpc-sky-cpu-redundant-or-incorrect-tests-on-unsigned
+++ a/drivers/misc/hdpuftrs/hdpu_cpustate.c
@@ -121,8 +121,6 @@ static ssize_t cpustate_read(struct file
{
unsigned char data;
- if (count < 0)
- return -EFAULT;
if (count == 0)
return 0;
@@ -137,9 +135,6 @@ static ssize_t cpustate_write(struct fil
{
unsigned char data;
- if (count < 0)
- return -EFAULT;
-
if (count == 0)
return 0;
_
More information about the Linuxppc-dev
mailing list