Skip to content

Commit c9ac080

Browse files
JuliaLawallkuba-moo
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 5f7dc7d commit c9ac080

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/net/ethernet/moxa/moxart_ether.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -510,14 +510,14 @@ static int moxart_mac_probe(struct platform_device *pdev)
510510
}
511511

512512
priv->tx_buf_base = kmalloc_array(priv->tx_buf_size, TX_DESC_NUM,
513-
GFP_ATOMIC);
513+
GFP_KERNEL);
514514
if (!priv->tx_buf_base) {
515515
ret = -ENOMEM;
516516
goto init_fail;
517517
}
518518

519519
priv->rx_buf_base = kmalloc_array(priv->rx_buf_size, RX_DESC_NUM,
520-
GFP_ATOMIC);
520+
GFP_KERNEL);
521521
if (!priv->rx_buf_base) {
522522
ret = -ENOMEM;
523523
goto init_fail;

0 commit comments

Comments
 (0)