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