Skip to content

Commit

Permalink
wlcore: use GFP_KERNEL together with GFP_DMA
Browse files Browse the repository at this point in the history
GFP_DMA should not be used by itself, it still needs GFP_KERNEL or
such.  Fix two occurrences of allocations with GFP_DMA only.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
  • Loading branch information
Luciano Coelho authored and John W. Linville committed May 15, 2012
1 parent 03bed29 commit fd492ed
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/net/wireless/ti/wlcore/boot.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ static int wlcore_boot_fw_version(struct wl1271 *wl)
struct wl1271_static_data *static_data;
int ret;

static_data = kmalloc(sizeof(*static_data), GFP_DMA);
static_data = kmalloc(sizeof(*static_data), GFP_KERNEL | GFP_DMA);
if (!static_data) {
wl1271_error("Couldn't allocate memory for static data!");
return -ENOMEM;
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/ti/wlcore/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -4861,7 +4861,7 @@ struct ieee80211_hw *wlcore_alloc_hw(size_t priv_size)
goto err_dummy_packet;
}

wl->mbox = kmalloc(sizeof(*wl->mbox), GFP_DMA);
wl->mbox = kmalloc(sizeof(*wl->mbox), GFP_KERNEL | GFP_DMA);
if (!wl->mbox) {
ret = -ENOMEM;
goto err_fwlog;
Expand Down

0 comments on commit fd492ed

Please sign in to comment.