liquidio: Droq validation
authorRaghu Vatsavayi <rvatsavayi@caviumnetworks.com>
Sun, 3 Jul 2016 20:56:54 +0000 (13:56 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 4 Jul 2016 23:15:31 +0000 (16:15 -0700)
This patch removes redudant droq num validation.

Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Satanand Burla <satananda.burla@caviumnetworks.com>
Signed-off-by: Felix Manlunas <felix.manlunas@caviumnetworks.com>
Signed-off-by: Raghu Vatsavayi <raghu.vatsavayi@caviumnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/cavium/liquidio/octeon_droq.c

index 8bfbe8c7e31e1eef1accb2819d6766c54a46d33b..93ab4ecd2a6187d82323adb3dafccc0a561b5b34 100644 (file)
@@ -821,18 +821,6 @@ octeon_process_droq_poll_cmd(struct octeon_device *oct, u32 q_no, int cmd,
                             u32 arg)
 {
        struct octeon_droq *droq;
-       struct octeon_config *oct_cfg = NULL;
-
-       oct_cfg = octeon_get_conf(oct);
-
-       if (!oct_cfg)
-               return -EINVAL;
-
-       if (q_no >= CFG_GET_OQ_MAX_Q(oct_cfg)) {
-               dev_err(&oct->pci_dev->dev, "%s: droq id (%d) exceeds MAX (%d)\n",
-                       __func__, q_no, (oct->num_oqs - 1));
-               return -EINVAL;
-       }
 
        droq = oct->droq[q_no];