Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 220079
b: refs/heads/master
c: b7378b9
h: refs/heads/master
i:
  220077: c697ca9
  220075: 8ca6782
  220071: 8c9754a
  220063: 1c8d35b
v: v3
  • Loading branch information
Vasiliy Kulikov authored and Greg Kroah-Hartman committed Oct 5, 2010
1 parent 15fedc0 commit bd9dcaa
Show file tree
Hide file tree
Showing 2 changed files with 20 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: a285bf995da256be5d96110ec0e7592cb6b2e600
refs/heads/master: b7378b9ed641b9e39f613d22c762a8ac2a15b8b8
21 changes: 19 additions & 2 deletions trunk/drivers/staging/ft1000/ft1000-usb/ft1000_hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -991,6 +991,7 @@ u16 init_ft1000_netdev(struct ft1000_device *ft1000dev)
FT1000_INFO *pInfo = NULL;
PDPRAM_BLK pdpram_blk;
int i;
struct list_head *cur, *tmp;

gCardIndex=0; //mbelian

Expand Down Expand Up @@ -1026,7 +1027,7 @@ u16 init_ft1000_netdev(struct ft1000_device *ft1000dev)
}
else {
printk(KERN_ERR "ft1000: Invalid device name\n");
kfree(netdev);
free_netdev(netdev);
return STATUS_FAILURE;
}
}
Expand Down Expand Up @@ -1099,8 +1100,14 @@ u16 init_ft1000_netdev(struct ft1000_device *ft1000dev)
for (i=0; i<NUM_OF_FREE_BUFFERS; i++) {
// Get memory for DPRAM_DATA link list
pdpram_blk = kmalloc ( sizeof(DPRAM_BLK), GFP_KERNEL );
if (pdpram_blk == NULL)
goto err_free;
// Get a block of memory to store command data
pdpram_blk->pbuffer = kmalloc ( MAX_CMD_SQSIZE, GFP_KERNEL );
if (pdpram_blk->pbuffer == NULL) {
kfree(pdpram_blk);
goto err_free;
}
// link provisioning data
list_add_tail (&pdpram_blk->list, &freercvpool);
}
Expand All @@ -1109,6 +1116,15 @@ u16 init_ft1000_netdev(struct ft1000_device *ft1000dev)

return STATUS_SUCCESS;


err_free:
list_for_each_safe(cur, tmp, &pdpram_blk->list) {
pdpram_blk = list_entry(cur, DPRAM_BLK, list);
list_del(&pdpram_blk->list);
kfree(pdpram_blk->pbuffer);
kfree(pdpram_blk);
}
return STATUS_FAILURE;
}


Expand Down Expand Up @@ -1265,7 +1281,8 @@ static int ft1000_read_fifo_reg(struct ft1000_device *ft1000dev,unsigned int pip

if(!urb || !dr)
{
if(urb) kfree(urb);
kfree(dr);
usb_free_urb(urb);
spin_unlock(&ft1000dev->device_lock);
return -ENOMEM;
}
Expand Down

0 comments on commit bd9dcaa

Please sign in to comment.