diff options
author | Julia Lawall <Julia.Lawall@inria.fr> | 2022-02-10 21:42:15 +0100 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-02-11 14:39:08 -0800 |
commit | c9ac080b25d98dbbea6caa165bfc0b88a88458cc (patch) | |
tree | b8cb7d30624e09496a2f8c71b9213d60a249d044 /drivers/net/ethernet/moxa | |
parent | 5f7dc7d48c9402dacc009e163ae7e342556ffbc4 (diff) |
net: moxa: use GFP_KERNEL
Platform_driver probe functions aren't called with locks
held and thus don't need GFP_ATOMIC. Use GFP_KERNEL instead.
Problem found with Coccinelle.
Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>
Link: https://lore.kernel.org/r/20220210204223.104181-1-Julia.Lawall@inria.fr
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/moxa')
-rw-r--r-- | drivers/net/ethernet/moxa/moxart_ether.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/moxa/moxart_ether.c b/drivers/net/ethernet/moxa/moxart_ether.c index 15179b9529e1..afb7dcadb8d2 100644 --- a/drivers/net/ethernet/moxa/moxart_ether.c +++ b/drivers/net/ethernet/moxa/moxart_ether.c @@ -510,14 +510,14 @@ static int moxart_mac_probe(struct platform_device *pdev) } priv->tx_buf_base = kmalloc_array(priv->tx_buf_size, TX_DESC_NUM, - GFP_ATOMIC); + GFP_KERNEL); if (!priv->tx_buf_base) { ret = -ENOMEM; goto init_fail; } priv->rx_buf_base = kmalloc_array(priv->rx_buf_size, RX_DESC_NUM, - GFP_ATOMIC); + GFP_KERNEL); if (!priv->rx_buf_base) { ret = -ENOMEM; goto init_fail; |