Commit 0230dfea authored by Dan Carpenter's avatar Dan Carpenter Committed by John W. Linville

wlcore: fixup an allocation

GFP_DMA isn't supposed to be used by itself.  This allocation is allowed
to sleep so it should be ORing it with GFP_KERNEL.
Also we should check for allocations errors.
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarLuciano Coelho <coelho@ti.com>
parent cd840f6a
......@@ -123,7 +123,9 @@ static int wl1271_cmd_wait_for_event_or_timeout(struct wl1271 *wl, u32 mask)
unsigned long timeout;
int ret = 0;
events_vector = kmalloc(sizeof(*events_vector), GFP_DMA);
events_vector = kmalloc(sizeof(*events_vector), GFP_KERNEL | GFP_DMA);
if (!events_vector)
return -ENOMEM;
timeout = jiffies + msecs_to_jiffies(WL1271_EVENT_TIMEOUT);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment