Thread (24 messages) flat view 24 messages, 3 authors, 2026-01-12
STALE216d

[PATCH 04/15] net: ftgmac100: Use devm_alloc_etherdev()

From: Jacky Chou <jacky_chou@aspeedtech.com>
Date: 2026-01-08 01:31:08
Also in: lkml

quoted
 	/* setup net_device */
-	netdev = alloc_etherdev(sizeof(*priv));
+	netdev = devm_alloc_etherdev(&pdev->dev, sizeof(*priv));
 	if (!netdev) {
-		err = -ENOMEM;
-		goto err_alloc_etherdev;
+		return -ENOMEM;
 	}
nit: There is no longer any need for {} here.
Thank you for your reply.
Agreed. After modification,
it becomes a single-run code, no need for curly braces {}.
I will remove it in next version.

Thanks,
Jacky
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help