Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 309501
b: refs/heads/master
c: 75813bd
h: refs/heads/master
i:
  309499: 6a06ee0
v: v3
  • Loading branch information
Johannes Berg authored and John W. Linville committed May 25, 2012
1 parent 21471a5 commit 222b9e3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f4c37176ef555560a1d13bc4bf2cf3debd442f40
refs/heads/master: 75813bde1f671aaab3185a9438da7730d356cea6
18 changes: 9 additions & 9 deletions trunk/drivers/net/wireless/iwlwifi/iwl-drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -657,17 +657,17 @@ static int iwl_parse_tlv_firmware(struct iwl_drv *drv,
return -EINVAL;
}

static int alloc_pci_desc(struct iwl_drv *drv,
struct iwl_firmware_pieces *pieces,
enum iwl_ucode_type type)
static int iwl_alloc_ucode(struct iwl_drv *drv,
struct iwl_firmware_pieces *pieces,
enum iwl_ucode_type type)
{
int i;
for (i = 0;
i < IWL_UCODE_SECTION_MAX && get_sec_size(pieces, type, i);
i++)
if (iwl_alloc_fw_desc(drv, &(drv->fw.img[type].sec[i]),
get_sec(pieces, type, i)))
return -1;
get_sec(pieces, type, i)))
return -ENOMEM;
return 0;
}

Expand Down Expand Up @@ -825,8 +825,8 @@ static void iwl_ucode_callback(const struct firmware *ucode_raw, void *context)
* 1) unmodified from disk
* 2) backup cache for save/restore during power-downs */
for (i = 0; i < IWL_UCODE_TYPE_MAX; i++)
if (alloc_pci_desc(drv, &pieces, i))
goto err_pci_alloc;
if (iwl_alloc_ucode(drv, &pieces, i))
goto out_free_fw;

/* Now that we can no longer fail, copy information */

Expand Down Expand Up @@ -866,7 +866,7 @@ static void iwl_ucode_callback(const struct firmware *ucode_raw, void *context)
drv->op_mode = iwl_dvm_ops.start(drv->trans, drv->cfg, &drv->fw);

if (!drv->op_mode)
goto out_unbind;
goto out_free_fw;

return;

Expand All @@ -877,7 +877,7 @@ static void iwl_ucode_callback(const struct firmware *ucode_raw, void *context)
goto out_unbind;
return;

err_pci_alloc:
out_free_fw:
IWL_ERR(drv, "failed to allocate pci memory\n");
iwl_dealloc_ucode(drv);
release_firmware(ucode_raw);
Expand Down

0 comments on commit 222b9e3

Please sign in to comment.