diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2013-08-05 06:42:00 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-08-05 20:09:42 +0200 |
commit | 1155e964a616a9bd4b603f6f8bf4f47576b010c5 (patch) | |
tree | 1a5edcdee5cfd19660ce666192eb576878840730 | |
parent | net: mlx4: Staticize local functions (diff) | |
download | linux-1155e964a616a9bd4b603f6f8bf4f47576b010c5.tar.xz linux-1155e964a616a9bd4b603f6f8bf4f47576b010c5.zip |
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 f3286a3af89d6db7a488f3e8f02b98d67d50f00c.
(tile: support multiple mPIPE shims in tilegx network driver)
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Chris Metcalf <cmetcalf@tilera.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/tile/tilegx.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ethernet/tile/tilegx.c b/drivers/net/ethernet/tile/tilegx.c index 907b5772fd55..5d2a719fc688 100644 --- a/drivers/net/ethernet/tile/tilegx.c +++ b/drivers/net/ethernet/tile/tilegx.c @@ -1510,8 +1510,10 @@ static int tile_net_open(struct net_device *dev) /* Get the instance info. */ 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; + } priv->instance = rc; instance = rc; |