*length = fw->size;
goto err;
}
- *buffer = VMALLOCZ(dhd->osh, fw->size);
+ *buffer = VMALLOCZ(dhd->osh, *length);
if (*buffer == NULL) {
DHD_ERROR(("%s: Failed to allocate memory %d bytes\n",
__FUNCTION__, (int)fw->size));
len = MAX_CLM_BUF_SIZE;
dhd_get_download_buffer(dhd, clm_blob_path, CLM_BLOB, &memblock, &len);
#ifdef DHD_LINUX_STD_FW_API
- memblock_len = len;
+ memblock_len = MAX_CLM_BUF_SIZE;
#else
memblock_len = MAX_CLM_BUF_SIZE;
#endif /* DHD_LINUX_STD_FW_API */
}
#ifdef DHD_LINUX_STD_FW_API
- memblock_len = len;
+ memblock_len = MAXSZ_CONFIG;
#else
memblock_len = MAXSZ_CONFIG;
#endif /* DHD_LINUX_STD_FW_API */
goto err;
#ifdef DHD_LINUX_STD_FW_API
- memblock_len = len;
+ memblock_len = MAX_NVRAMBUF_SIZE;
#else
memblock_len = MAX_NVRAMBUF_SIZE;
#endif /* DHD_LINUX_STD_FW_API */