Skip to content

Commit f30e472

Browse files
TaeheeYoodavem330
authored andcommitted
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>
1 parent 071c8ed commit f30e472

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

‎net/hsr/hsr_device.c‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,13 +125,11 @@ int hsr_get_max_mtu(struct hsr_priv *hsr)
125125
static int hsr_dev_change_mtu(struct net_device *dev, int new_mtu)
126126
{
127127
struct hsr_priv *hsr;
128-
struct hsr_port *master;
129128

130129
hsr = netdev_priv(dev);
131-
master = hsr_port_get_hsr(hsr, HSR_PT_MASTER);
132130

133131
if (new_mtu > hsr_get_max_mtu(hsr)) {
134-
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",
132+
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",
135133
HSR_HLEN);
136134
return -EINVAL;
137135
}

0 commit comments

Comments
 (0)