Explorar el Código

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 <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jouni Malinen hace 16 años
padre
commit
222d0b33b3
Se han modificado 1 ficheros con 1 adiciones y 0 borrados
  1. 1 0
      drivers/net/wireless/ath9k/main.c

+ 1 - 0
drivers/net/wireless/ath9k/main.c

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