diff options
author | Taehee Yoo <ap420073@gmail.com> | 2020-04-24 12:43:09 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-04-25 20:40:57 -0700 |
commit | f30e472071c827e2c2f191c8a011b7e371e17af5 (patch) | |
tree | 54f3f7fad3b2d60c2a147ae14a0fbfb26165d2f8 /net/hsr | |
parent | 071c8ed6e88d2ac0a5f26948fb9c288fd4dd6e40 (diff) | |
download | linux-f30e472071c827e2c2f191c8a011b7e371e17af5.tar.bz2 |
hsr: remove unnecessary code in hsr_dev_change_mtu()
In the hsr_dev_change_mtu(), the 'dev' and 'master->dev' pointer are
same. So, the 'master' variable and some code are unnecessary.
Signed-off-by: Taehee Yoo <ap420073@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/hsr')
-rw-r--r-- | net/hsr/hsr_device.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/net/hsr/hsr_device.c b/net/hsr/hsr_device.c index fc7027314ad8..cd99f548e440 100644 --- a/net/hsr/hsr_device.c +++ b/net/hsr/hsr_device.c @@ -125,13 +125,11 @@ int hsr_get_max_mtu(struct hsr_priv *hsr) static int hsr_dev_change_mtu(struct net_device *dev, int new_mtu) { struct hsr_priv *hsr; - struct hsr_port *master; hsr = netdev_priv(dev); - master = hsr_port_get_hsr(hsr, HSR_PT_MASTER); if (new_mtu > hsr_get_max_mtu(hsr)) { - netdev_info(master->dev, "A HSR master's MTU cannot be greater than the smallest MTU of its slaves minus the HSR Tag length (%d octets).\n", + netdev_info(dev, "A HSR master's MTU cannot be greater than the smallest MTU of its slaves minus the HSR Tag length (%d octets).\n", HSR_HLEN); return -EINVAL; } |