diff options
-rw-r--r-- | drivers/bluetooth/btmrvl_sdio.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/bluetooth/btmrvl_sdio.c b/drivers/bluetooth/btmrvl_sdio.c index 182e55345d6..dcc2a6ec23f 100644 --- a/drivers/bluetooth/btmrvl_sdio.c +++ b/drivers/bluetooth/btmrvl_sdio.c | |||
@@ -217,7 +217,7 @@ static int btmrvl_sdio_download_helper(struct btmrvl_sdio_card *card) | |||
217 | 217 | ||
218 | tmphlprbufsz = ALIGN_SZ(BTM_UPLD_SIZE, BTSDIO_DMA_ALIGN); | 218 | tmphlprbufsz = ALIGN_SZ(BTM_UPLD_SIZE, BTSDIO_DMA_ALIGN); |
219 | 219 | ||
220 | tmphlprbuf = kmalloc(tmphlprbufsz, GFP_KERNEL); | 220 | tmphlprbuf = kzalloc(tmphlprbufsz, GFP_KERNEL); |
221 | if (!tmphlprbuf) { | 221 | if (!tmphlprbuf) { |
222 | BT_ERR("Unable to allocate buffer for helper." | 222 | BT_ERR("Unable to allocate buffer for helper." |
223 | " Terminating download"); | 223 | " Terminating download"); |
@@ -225,8 +225,6 @@ static int btmrvl_sdio_download_helper(struct btmrvl_sdio_card *card) | |||
225 | goto done; | 225 | goto done; |
226 | } | 226 | } |
227 | 227 | ||
228 | memset(tmphlprbuf, 0, tmphlprbufsz); | ||
229 | |||
230 | helperbuf = (u8 *) ALIGN_ADDR(tmphlprbuf, BTSDIO_DMA_ALIGN); | 228 | helperbuf = (u8 *) ALIGN_ADDR(tmphlprbuf, BTSDIO_DMA_ALIGN); |
231 | 229 | ||
232 | /* Perform helper data transfer */ | 230 | /* Perform helper data transfer */ |
@@ -319,7 +317,7 @@ static int btmrvl_sdio_download_fw_w_helper(struct btmrvl_sdio_card *card) | |||
319 | BT_DBG("Downloading FW image (%d bytes)", firmwarelen); | 317 | BT_DBG("Downloading FW image (%d bytes)", firmwarelen); |
320 | 318 | ||
321 | tmpfwbufsz = ALIGN_SZ(BTM_UPLD_SIZE, BTSDIO_DMA_ALIGN); | 319 | tmpfwbufsz = ALIGN_SZ(BTM_UPLD_SIZE, BTSDIO_DMA_ALIGN); |
322 | tmpfwbuf = kmalloc(tmpfwbufsz, GFP_KERNEL); | 320 | tmpfwbuf = kzalloc(tmpfwbufsz, GFP_KERNEL); |
323 | if (!tmpfwbuf) { | 321 | if (!tmpfwbuf) { |
324 | BT_ERR("Unable to allocate buffer for firmware." | 322 | BT_ERR("Unable to allocate buffer for firmware." |
325 | " Terminating download"); | 323 | " Terminating download"); |
@@ -327,8 +325,6 @@ static int btmrvl_sdio_download_fw_w_helper(struct btmrvl_sdio_card *card) | |||
327 | goto done; | 325 | goto done; |
328 | } | 326 | } |
329 | 327 | ||
330 | memset(tmpfwbuf, 0, tmpfwbufsz); | ||
331 | |||
332 | /* Ensure aligned firmware buffer */ | 328 | /* Ensure aligned firmware buffer */ |
333 | fwbuf = (u8 *) ALIGN_ADDR(tmpfwbuf, BTSDIO_DMA_ALIGN); | 329 | fwbuf = (u8 *) ALIGN_ADDR(tmpfwbuf, BTSDIO_DMA_ALIGN); |
334 | 330 | ||