Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 188002
b: refs/heads/master
c: 4109316
h: refs/heads/master
v: v3
  • Loading branch information
Zhu Yi authored and John W. Linville committed Mar 10, 2010
1 parent 03abc47 commit 7eafefe
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 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: 5f13bfac0718ce6f83ecba3755f224c3790e8d66
refs/heads/master: 41093167ec6c1854903a4bc38a37b5740c028984
19 changes: 17 additions & 2 deletions trunk/drivers/net/wireless/ipw2x00/ipw2200.c
Original file line number Diff line number Diff line change
Expand Up @@ -3177,14 +3177,27 @@ static int ipw_load_firmware(struct ipw_priv *priv, u8 * data, size_t len)
int total_nr = 0;
int i;
struct pci_pool *pool;
u32 *virts[CB_NUMBER_OF_ELEMENTS_SMALL];
dma_addr_t phys[CB_NUMBER_OF_ELEMENTS_SMALL];
void **virts;
dma_addr_t *phys;

IPW_DEBUG_TRACE("<< : \n");

virts = kmalloc(sizeof(void *) * CB_NUMBER_OF_ELEMENTS_SMALL,
GFP_KERNEL);
if (!virts)
return -ENOMEM;

phys = kmalloc(sizeof(dma_addr_t) * CB_NUMBER_OF_ELEMENTS_SMALL,
GFP_KERNEL);
if (!phys) {
kfree(virts);
return -ENOMEM;
}
pool = pci_pool_create("ipw2200", priv->pci_dev, CB_MAX_LENGTH, 0, 0);
if (!pool) {
IPW_ERROR("pci_pool_create failed\n");
kfree(phys);
kfree(virts);
return -ENOMEM;
}

Expand Down Expand Up @@ -3254,6 +3267,8 @@ static int ipw_load_firmware(struct ipw_priv *priv, u8 * data, size_t len)
pci_pool_free(pool, virts[i], phys[i]);

pci_pool_destroy(pool);
kfree(phys);
kfree(virts);

return ret;
}
Expand Down

0 comments on commit 7eafefe

Please sign in to comment.