Skip to content

Commit

Permalink
macvlan: use netdev_is_rx_handler_busy instead of checking specific type
Browse files Browse the repository at this point in the history
netdev_is_rx_handler_busy() check is a superset of netif_is_ipvlan_port()
check and hence should be preferred.

Signed-off-by: Mahesh Bandewar <maheshb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Mahesh Bandewar authored and David S. Miller committed Jan 20, 2017
1 parent c3262d9 commit 322dc6e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/macvlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -1110,7 +1110,7 @@ static int macvlan_port_create(struct net_device *dev)
if (dev->type != ARPHRD_ETHER || dev->flags & IFF_LOOPBACK)
return -EINVAL;

if (netif_is_ipvlan_port(dev))
if (netdev_is_rx_handler_busy(dev))
return -EBUSY;

port = kzalloc(sizeof(*port), GFP_KERNEL);
Expand Down

0 comments on commit 322dc6e

Please sign in to comment.