Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 141217
b: refs/heads/master
c: 7c98f71
h: refs/heads/master
i:
  141215: 3c1a5fe
v: v3
  • Loading branch information
Moritz Muehlenhoff authored and Greg Kroah-Hartman committed Apr 3, 2009
1 parent 0009bc0 commit 6624698
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 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: e469ee7f561657e260690ae202a32adb60e26730
refs/heads/master: 7c98f718786c3c6d03ee377b62838fff3cc8f573
9 changes: 3 additions & 6 deletions trunk/drivers/staging/wlan-ng/prism2sta.c
Original file line number Diff line number Diff line change
Expand Up @@ -1134,8 +1134,7 @@ static void prism2sta_inf_hostscanresults(wlandevice_t *wlandev,
if (nbss > 32)
nbss = 32;

if (hw->scanresults)
kfree(hw->scanresults);
kfree(hw->scanresults);

hw->scanresults = kmalloc(sizeof(hfa384x_InfFrame_t), GFP_ATOMIC);
memcpy(hw->scanresults, inf, sizeof(hfa384x_InfFrame_t));
Expand Down Expand Up @@ -1966,10 +1965,8 @@ static wlandevice_t *create_wlan(void)

if (!wlandev || !hw) {
printk(KERN_ERR "%s: Memory allocation failure.\n", dev_info);
if (wlandev)
kfree(wlandev);
if (hw)
kfree(hw);
kfree(wlandev);
kfree(hw);
return NULL;
}

Expand Down
6 changes: 2 additions & 4 deletions trunk/drivers/staging/wlan-ng/prism2usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,8 @@ static int prism2sta_probe_usb(struct usb_interface *interface,
goto done;

failed:
if (wlandev)
kfree(wlandev);
if (hw)
kfree(hw);
kfree(wlandev);
kfree(hw);
wlandev = NULL;

done:
Expand Down

0 comments on commit 6624698

Please sign in to comment.