net/sched: cbs: remove redundant assignment to variable port_rate
authorColin Ian King <colin.king@canonical.com>
Mon, 2 Sep 2019 18:26:37 +0000 (19:26 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 5 Sep 2019 07:37:02 +0000 (09:37 +0200)
Variable port_rate is being initialized with a value that is never read
and is being re-assigned a little later on. The assignment is redundant
and hence can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/sch_cbs.c

index 810645b5c086101622393d2a5ae44613ff14f1d6..93b58fde99b735a8a00be11b21bce887b3811dc9 100644 (file)
@@ -299,7 +299,7 @@ static void cbs_set_port_rate(struct net_device *dev, struct cbs_sched_data *q)
 {
        struct ethtool_link_ksettings ecmd;
        int speed = SPEED_10;
-       int port_rate = -1;
+       int port_rate;
        int err;
 
        err = __ethtool_get_link_ksettings(dev, &ecmd);