Commit 2e299cc9 authored by Adham Abozaeid's avatar Adham Abozaeid Committed by Greg Kroah-Hartman
Browse files

staging: wilc1000: Avoid GFP_KERNEL allocation from atomic context



txq_add_mgmt_pkt allocates memory while being called from atomic context
so needs to use GFP_ATOMIC

Signed-off-by: default avatarAdham Abozaeid <adham.abozaeid@microchip.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6229fed9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -316,7 +316,7 @@ int wilc_wlan_txq_add_mgmt_pkt(struct net_device *dev, void *priv, u8 *buffer,
	if (wilc->quit)
		return 0;

	tqe = kmalloc(sizeof(*tqe), GFP_KERNEL);
	tqe = kmalloc(sizeof(*tqe), GFP_ATOMIC);

	if (!tqe)
		return 0;