OSDN Git Service

drivers/misc/sgi-gru: remove always false condition
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>
Thu, 3 Sep 2015 14:50:49 +0000 (20:20 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 21 Sep 2015 02:27:59 +0000 (19:27 -0700)
The member gid in struct gru_dump_chiplet_state_req is unsigned int. So
it can never be less than 0.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Acked-by: Dimitri Sivanich <sivanich@sgi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/sgi-gru/grukdump.c

index 7e9aae5..313da31 100644 (file)
@@ -194,7 +194,7 @@ int gru_dump_chiplet_request(unsigned long arg)
                return -EFAULT;
 
        /* Currently, only dump by gid is implemented */
-       if (req.gid >= gru_max_gids || req.gid < 0)
+       if (req.gid >= gru_max_gids)
                return -EINVAL;
 
        gru = GID_TO_GRU(req.gid);