Thread (27 messages) 27 messages, 2 authors, 2015-08-21

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

From: Taku Izumi <redacted>
Date: Thu, 20 Aug 2015 17:46:08 +0900
+
+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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help