提交 e0fee99f 编写于 作者: B Breno Leitao 提交者: David S. Miller

qlge: removing unreachable block of code

Currently the qlge_change_mtu() is never called if the new_mtu is
equal current MTU, due this condition on dev_set_mtu():

        if (new_mtu == dev->mtu)
                return 0;

So, this block of code is never reached and is being removed.
Signed-off-by: NBreno Leitao <leitao@linux.vnet.ibm.com>
Signed-off-by: NRon Mercer <ron.mercer@qlogic.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 d088dde7
......@@ -4123,9 +4123,6 @@ static int qlge_change_mtu(struct net_device *ndev, int new_mtu)
QPRINTK(qdev, IFUP, ERR, "Changing to jumbo MTU.\n");
} else if (ndev->mtu == 9000 && new_mtu == 1500) {
QPRINTK(qdev, IFUP, ERR, "Changing to normal MTU.\n");
} else if ((ndev->mtu == 1500 && new_mtu == 1500) ||
(ndev->mtu == 9000 && new_mtu == 9000)) {
return 0;
} else
return -EINVAL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册