All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] tile: fix missing unlock on error in tile_net_open()
@ 2013-08-05  4:42 Wei Yongjun
  2013-08-05 15:10 ` Chris Metcalf
  0 siblings, 1 reply; 3+ messages in thread
From: Wei Yongjun @ 2013-08-05  4:42 UTC (permalink / raw)
  To: cmetcalf, davem; +Cc: yongjun_wei, netdev

From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

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>
---
 drivers/net/ethernet/tile/tilegx.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/tile/tilegx.c b/drivers/net/ethernet/tile/tilegx.c
index 907b577..5d2a719 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;

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-08-05 18:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-05  4:42 [PATCH -next] tile: fix missing unlock on error in tile_net_open() Wei Yongjun
2013-08-05 15:10 ` Chris Metcalf
2013-08-05 18:09   ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.