Commit 1155e964 authored by Wei Yongjun's avatar Wei Yongjun Committed by David S. Miller

tile: fix missing unlock on error in tile_net_open()

Add the missing unlock before return from function tile_net_open()
in the error handling case.

Introduced by commit f3286a3a.
(tile: support multiple mPIPE shims in tilegx network driver)
Signed-off-by: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: default avatarChris Metcalf <cmetcalf@tilera.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f094668c
...@@ -1510,8 +1510,10 @@ static int tile_net_open(struct net_device *dev) ...@@ -1510,8 +1510,10 @@ static int tile_net_open(struct net_device *dev)
/* Get the instance info. */ /* Get the instance info. */
rc = gxio_mpipe_link_instance(dev->name); rc = gxio_mpipe_link_instance(dev->name);
if (rc < 0 || rc >= NR_MPIPE_MAX) if (rc < 0 || rc >= NR_MPIPE_MAX) {
mutex_unlock(&tile_net_devs_for_channel_mutex);
return -EIO; return -EIO;
}
priv->instance = rc; priv->instance = rc;
instance = rc; instance = rc;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment