wlcore: use GFP_KERNEL together with GFP_DMA
authorLuciano Coelho <coelho@ti.com>
Thu, 3 May 2012 07:31:02 +0000 (10:31 +0300)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 15 May 2012 21:53:22 +0000 (17:53 -0400)
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>
drivers/net/wireless/ti/wlcore/boot.c
drivers/net/wireless/ti/wlcore/main.c

index 3a2207db540523d34213de0f82c0bcfdae0ac4dd..eb204ba979350fabbcfcec6189ffd232d36ba498 100644 (file)
@@ -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;
index 2b0f987660c69b49af30703cd2fb2f02ed413775..b156bc666086d22e73da12ebd3d359c1adb29eba 100644 (file)
@@ -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;