Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 203805
b: refs/heads/master
c: 929ebd3
h: refs/heads/master
i:
  203803: c0aea00
v: v3
  • Loading branch information
Julia Lawall authored and John W. Linville committed Jul 26, 2010
1 parent 201db2e commit b7b7402
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 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: 3289a8368c294726659588d044e354dd3bcf44b3
refs/heads/master: 929ebd30e4f982a1d2817f70154e7441f5714118
8 changes: 2 additions & 6 deletions trunk/drivers/net/wireless/wl12xx/wl1271_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -576,16 +576,14 @@ static int wl1271_fetch_nvs(struct wl1271 *wl)
goto out;
}

wl->nvs = kzalloc(sizeof(struct wl1271_nvs_file), GFP_KERNEL);
wl->nvs = kmemdup(fw->data, sizeof(struct wl1271_nvs_file), GFP_KERNEL);

if (!wl->nvs) {
wl1271_error("could not allocate memory for the nvs file");
ret = -ENOMEM;
goto out;
}

memcpy(wl->nvs, fw->data, fw->size);

out:
release_firmware(fw);

Expand Down Expand Up @@ -2350,15 +2348,13 @@ struct ieee80211_hw *wl1271_alloc_hw(void)
goto err_hw_alloc;
}

plat_dev = kmalloc(sizeof(wl1271_device), GFP_KERNEL);
plat_dev = kmemdup(&wl1271_device, sizeof(wl1271_device), GFP_KERNEL);
if (!plat_dev) {
wl1271_error("could not allocate platform_device");
ret = -ENOMEM;
goto err_plat_alloc;
}

memcpy(plat_dev, &wl1271_device, sizeof(wl1271_device));

wl = hw->priv;
memset(wl, 0, sizeof(*wl));

Expand Down

0 comments on commit b7b7402

Please sign in to comment.