2009-02-24 11:40:14

by Jouni Malinen

[permalink] [raw]
Subject: [PATCH] ath9k: Unlock sc->mutex on error path

An error path in ath9k_add_interface() did not unlock the sc->mutex and
could leave the driver in quite unresponsive state.

Signed-off-by: Jouni Malinen <[email protected]>

---
drivers/net/wireless/ath9k/main.c | 1 +
1 file changed, 1 insertion(+)

--- wireless-testing.orig/drivers/net/wireless/ath9k/main.c 2009-02-24 13:34:20.000000000 +0200
+++ wireless-testing/drivers/net/wireless/ath9k/main.c 2009-02-24 13:34:44.000000000 +0200
@@ -2145,6 +2145,7 @@ static int ath9k_add_interface(struct ie
default:
DPRINTF(sc, ATH_DBG_FATAL,
"Interface type %d not yet supported\n", conf->type);
+ mutex_unlock(&sc->mutex);
return -EOPNOTSUPP;
}


--
Jouni Malinen PGP id EFC895FA