]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/net/ethernet/tile/tilegx.c
tile: fix missing unlock on error in tile_net_open()
[karo-tx-linux.git] / drivers / net / ethernet / tile / tilegx.c
index 907b5772fd552688af2dba806dee70a8a243ff30..5d2a719fc68824c3b77ee5519406f4f9df31d42f 100644 (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;