Skip to contentSkip to conversation

iwlwifi: unlock on error path

PATCH In review Dan Carpenter 2 participants 2 messages Jun 14, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iwlwifi: unlock on error path

We introduced a lock here in ff1ffb850b ("iwlwifi: fix dynamic loading"). But we missed an error path which needs an unlock.

drivers/net/wireless/iwlwifi/iwl-drv.c +3 -1
index 095547b..a175997 100644
@@ -911,8 +911,10 @@ static void iwl_ucode_callback(const struct firmware *ucode_raw, void *context)
 		const struct iwl_op_mode_ops *ops = op->ops;
 		drv->op_mode = ops->start(drv->trans, drv->cfg, &drv->fw);
 
-		if (!drv->op_mode)
+		if (!drv->op_mode) {
+			mutex_unlock(&iwlwifi_opmode_table_mtx);
 			goto out_unbind;
+		}
 	} else {
 		load_module = true;
 	}
maintainer
#1 lore raw
Quoted 2 lines · Dan Carpenter

We introduced a lock here in ff1ffb850b ("iwlwifi: fix dynamic loading"). But we missed an error path which needs an unlock.

Thanks Dan. John, this is the other merge issue I was talking about :-)

johannes