[PATCH -next] tile: fix missing unlock on error in tile_net_open()

Subsystems: networking drivers, the rest

STALE4784d

3 messages, 3 authors, 2013-08-05 · open the first message on its own page

[PATCH -next] tile: fix missing unlock on error in tile_net_open()

From: Wei Yongjun <hidden>
Date: 2013-08-05 04:42:02

From: Wei Yongjun <redacted>

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 <redacted>
---
 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;

Re: [PATCH -next] tile: fix missing unlock on error in tile_net_open()

From: Chris Metcalf <hidden>
Date: 2013-08-05 15:10:32

On 8/5/2013 12:42 AM, Wei Yongjun wrote:
From: Wei Yongjun <redacted>

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

Acked-by: Chris Metcalf <redacted>

-- 
Chris Metcalf, Tilera Corp.
http://www.tilera.com

Re: [PATCH -next] tile: fix missing unlock on error in tile_net_open()

From: David Miller <davem@davemloft.net>
Date: 2013-08-05 18:09:53

From: Chris Metcalf <redacted>
Date: Mon, 5 Aug 2013 11:10:29 -0400
On 8/5/2013 12:42 AM, Wei Yongjun wrote:
quoted
From: Wei Yongjun <redacted>

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

Acked-by: Chris Metcalf <redacted>
Applied.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help