ath9k: Unlock sc->mutex on error path
authorJouni Malinen <jouni.malinen@atheros.com>
Tue, 24 Feb 2009 11:40:01 +0000 (13:40 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 27 Feb 2009 19:53:04 +0000 (14:53 -0500)
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 <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath9k/main.c

index 1e38242..f5f5739 100644 (file)
@@ -2145,6 +2145,7 @@ static int ath9k_add_interface(struct ieee80211_hw *hw,
        default:
                DPRINTF(sc, ATH_DBG_FATAL,
                        "Interface type %d not yet supported\n", conf->type);
+               mutex_unlock(&sc->mutex);
                return -EOPNOTSUPP;
        }