diff options
-rw-r--r-- | drivers/net/veth.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/veth.c b/drivers/net/veth.c index 0f71a4fe506a..e1da42aaf9de 100644 --- a/drivers/net/veth.c +++ b/drivers/net/veth.c | |||
@@ -206,9 +206,11 @@ static int veth_open(struct net_device *dev) | |||
206 | static int veth_close(struct net_device *dev) | 206 | static int veth_close(struct net_device *dev) |
207 | { | 207 | { |
208 | struct veth_priv *priv = netdev_priv(dev); | 208 | struct veth_priv *priv = netdev_priv(dev); |
209 | struct net_device *peer = rtnl_dereference(priv->peer); | ||
209 | 210 | ||
210 | netif_carrier_off(dev); | 211 | netif_carrier_off(dev); |
211 | netif_carrier_off(rtnl_dereference(priv->peer)); | 212 | if (peer) |
213 | netif_carrier_off(peer); | ||
212 | 214 | ||
213 | return 0; | 215 | return 0; |
214 | } | 216 | } |