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 f3286a3af8.
(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>
This commit is contained in:
Wei Yongjun 2013-08-05 12:42:00 +08:00 committed by David S. Miller
parent f094668ca1
commit 1155e964a6

View File

@ -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;