Thread (9 messages) 9 messages, 3 authors, 2025-07-23

Re: [PATCH net-next v11 2/5] net: ti: prueth: Adds ICSSM Ethernet driver

From: Markus Elfring <hidden>
Date: 2025-07-22 15:37:16
Also in: linux-arm-kernel, lkml, netdev

quoted hunk ↗ jump to hunk
+++ b/drivers/net/ethernet/ti/icssm/icssm_prueth.c
@@ -0,0 +1,609 @@
+static int icssm_prueth_probe(struct platform_device *pdev)
+{
+	/* register the network devices */
+	if (eth0_node) {
+	}
+
+	if (eth1_node) {
+	}
+
+	if (eth1_node)
+		of_node_put(eth1_node);
+	if (eth0_node)
+		of_node_put(eth0_node);
+	return 0;
…

I suggest to avoid duplicate condition checks for such a function implementation.
Can any code be reused from another function?

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