Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 232598
b: refs/heads/master
c: e375870
h: refs/heads/master
v: v3
  • Loading branch information
Larry Finger authored and Greg Kroah-Hartman committed Jan 20, 2011
1 parent ba2cb42 commit 8038466
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 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: 8e290fd41a15e392af87a33c9c4db3daffcd558b
refs/heads/master: e375870b9295be40de7372c3c9de6799e254c96a
11 changes: 7 additions & 4 deletions trunk/drivers/staging/rtl8712/hal_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,20 +128,21 @@ static u8 rtl8712_dl_fw(struct _adapter *padapter)
u8 *ptmpchar = NULL, *ppayload, *ptr;
struct tx_desc *ptx_desc;
u32 txdscp_sz = sizeof(struct tx_desc);
u8 ret = _FAIL;

ulfilelength = rtl871x_open_fw(padapter, &phfwfile_hdl, &pmappedfw);
if (pmappedfw && (ulfilelength > 0)) {
update_fwhdr(&fwhdr, pmappedfw);
if (chk_fwhdr(&fwhdr, ulfilelength) == _FAIL)
goto exit_fail;
goto firmware_rel;
fill_fwpriv(padapter, &fwhdr.fwpriv);
/* firmware check ok */
maxlen = (fwhdr.img_IMEM_size > fwhdr.img_SRAM_size) ?
fwhdr.img_IMEM_size : fwhdr.img_SRAM_size;
maxlen += txdscp_sz;
ptmpchar = _malloc(maxlen + FWBUFF_ALIGN_SZ);
if (ptmpchar == NULL)
return _FAIL;
goto firmware_rel;

ptx_desc = (struct tx_desc *)(ptmpchar + FWBUFF_ALIGN_SZ -
((addr_t)(ptmpchar) & (FWBUFF_ALIGN_SZ - 1)));
Expand Down Expand Up @@ -273,11 +274,13 @@ static u8 rtl8712_dl_fw(struct _adapter *padapter)
goto exit_fail;
} else
goto exit_fail;
return _SUCCESS;
ret = _SUCCESS;

exit_fail:
kfree(ptmpchar);
return _FAIL;
firmware_rel:
release_firmware((struct firmware *)phfwfile_hdl);
return ret;
}

uint rtl8712_hal_init(struct _adapter *padapter)
Expand Down

0 comments on commit 8038466

Please sign in to comment.