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>
/* 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;