Commit 1155e964 authored by Wei Yongjun's avatar Wei Yongjun Committed by David S. Miller
Browse files

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 f3286a3a.
(tile: support multiple mPIPE shims in tilegx network driver)

Signed-off-by: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: default avatarChris Metcalf <cmetcalf@tilera.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f094668c
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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;