Re: [PATCH v2.2 04/22] fjes: platform_driver's .probe and .remove routine

From
David Miller <davem@davemloft.net>
Date
2015-08-20 22:51:28
Also in
linux-acpi, platform-driver-x86
Reply to
Taku Izumi, 2015-08-20
From: Taku Izumi <redacted>
Date: Thu, 20 Aug 2015 17:46:08 +0900
quoted hunk ↗ jump to hunk
+
+err_register:
+	fjes_hw_exit(&adapter->hw);
+err_hw_init:
+err_sw_init:
+	free_netdev(netdev);
+err_alloc_netdev:
+	return err;
Having multiple code labels in the same exact spot is suboptimal.

Instead, name the labels such that they describe the first cleanup
action they will perform, instead of the context in which they are
jumped to from.

So "err_hw_exit:", "err_free_netdev", and "err_out:" would be
appropriate.
Thread (27 messages) 27 messages, 2 authors, 2015-08-21
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help