summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/tile/tilegx.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ethernet/tile/tilegx.c')
-rw-r--r--drivers/net/ethernet/tile/tilegx.c4
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;