tipc: remove unnecessary call to dev_net()
authorKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 6 Sep 2017 09:08:06 +0000 (11:08 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 7 Sep 2017 04:25:52 +0000 (21:25 -0700)
The net device is already stored in the 'net' variable, so no need to call
dev_net() again.

Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Acked-by: Ying Xue <ying.xue@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/bearer.c

index ac1d66d7e1fdddcfc53e2251e542c0c8e28ef6d8..47ec121574ce4ef95850f688d85b50eff766a710 100644 (file)
@@ -637,7 +637,7 @@ static int tipc_l2_device_event(struct notifier_block *nb, unsigned long evt,
                break;
        case NETDEV_UNREGISTER:
        case NETDEV_CHANGENAME:
-               bearer_disable(dev_net(dev), b);
+               bearer_disable(net, b);
                break;
        }
        return NOTIFY_OK;