diff options
-rw-r--r-- | drivers/s390/net/netiucv.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/s390/net/netiucv.c b/drivers/s390/net/netiucv.c index 4ffa66c87ea5..9ca3996f65b2 100644 --- a/drivers/s390/net/netiucv.c +++ b/drivers/s390/net/netiucv.c | |||
@@ -2040,6 +2040,7 @@ static struct net_device *netiucv_init_netdevice(char *username, char *userdata) | |||
2040 | netiucv_setup_netdevice); | 2040 | netiucv_setup_netdevice); |
2041 | if (!dev) | 2041 | if (!dev) |
2042 | return NULL; | 2042 | return NULL; |
2043 | rtnl_lock(); | ||
2043 | if (dev_alloc_name(dev, dev->name) < 0) | 2044 | if (dev_alloc_name(dev, dev->name) < 0) |
2044 | goto out_netdev; | 2045 | goto out_netdev; |
2045 | 2046 | ||
@@ -2061,6 +2062,7 @@ static struct net_device *netiucv_init_netdevice(char *username, char *userdata) | |||
2061 | out_fsm: | 2062 | out_fsm: |
2062 | kfree_fsm(privptr->fsm); | 2063 | kfree_fsm(privptr->fsm); |
2063 | out_netdev: | 2064 | out_netdev: |
2065 | rtnl_unlock(); | ||
2064 | free_netdev(dev); | 2066 | free_netdev(dev); |
2065 | return NULL; | 2067 | return NULL; |
2066 | } | 2068 | } |
@@ -2100,6 +2102,7 @@ static ssize_t conn_write(struct device_driver *drv, | |||
2100 | 2102 | ||
2101 | rc = netiucv_register_device(dev); | 2103 | rc = netiucv_register_device(dev); |
2102 | if (rc) { | 2104 | if (rc) { |
2105 | rtnl_unlock(); | ||
2103 | IUCV_DBF_TEXT_(setup, 2, | 2106 | IUCV_DBF_TEXT_(setup, 2, |
2104 | "ret %d from netiucv_register_device\n", rc); | 2107 | "ret %d from netiucv_register_device\n", rc); |
2105 | goto out_free_ndev; | 2108 | goto out_free_ndev; |
@@ -2109,7 +2112,8 @@ static ssize_t conn_write(struct device_driver *drv, | |||
2109 | priv = netdev_priv(dev); | 2112 | priv = netdev_priv(dev); |
2110 | SET_NETDEV_DEV(dev, priv->dev); | 2113 | SET_NETDEV_DEV(dev, priv->dev); |
2111 | 2114 | ||
2112 | rc = register_netdev(dev); | 2115 | rc = register_netdevice(dev); |
2116 | rtnl_unlock(); | ||
2113 | if (rc) | 2117 | if (rc) |
2114 | goto out_unreg; | 2118 | goto out_unreg; |
2115 | 2119 | ||