dect
/
linux-2.6
Archived
13
0
Fork 0

brcm80211: smac: Use kmemdup rather than duplicating its implementation

The semantic patch that makes this change is available
in scripts/coccinelle/api/memdup.cocci.

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Acked-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
Thomas Meyer 2011-11-17 23:43:40 +01:00 committed by John W. Linville
parent 0dcc3c8429
commit 1f1d528977
1 changed files with 1 additions and 2 deletions

View File

@ -1549,11 +1549,10 @@ int brcms_ucode_init_buf(struct brcms_info *wl, void **pbuf, u32 idx)
if (le32_to_cpu(hdr->idx) == idx) {
pdata = wl->fw.fw_bin[i]->data +
le32_to_cpu(hdr->offset);
*pbuf = kmalloc(len, GFP_ATOMIC);
*pbuf = kmemdup(pdata, len, GFP_ATOMIC);
if (*pbuf == NULL)
goto fail;
memcpy(*pbuf, pdata, len);
return 0;
}
}