iwlwifi: unlock on error path
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 14 Jun 2012 18:35:26 +0000 (21:35 +0300)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 14 Jun 2012 18:55:14 +0000 (14:55 -0400)
We introduced a lock here in ff1ffb850b ("iwlwifi: fix dynamic
loading").  But we missed an error path which needs an unlock.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlwifi/iwl-drv.c

index 095547b37a274ac90e3615a8f7bf8c9275b2b776..a175997e782965022703e7850a2600f62b5da9ac 100644 (file)
@@ -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;
        }