mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v4] um: vector: Fix exception handling in vector_eth_configure()
@ 2023-07-06  1:39 Minjie Du
  2023-08-19 21:01 ` Richard Weinberger
  0 siblings, 1 reply; 3+ messages in thread
From: Minjie Du @ 2023-07-06  1:39 UTC (permalink / raw)
  To: anton.ivanov, Richard Weinberger, Johannes Berg,
	Stephen Rothwell, open list:USER-MODE LINUX (UML),
	open list, open list:BPF [MISC]
  Cc: opensource.kernel, Minjie Du

The resource cleanup was incomplete in the implementation 
of the function "vector_eth_configure".
Thus replace the jump target
"out_undo_user_init" by "out_free_netdev".
Delate the orphan function "out_undo_user_init"

PATCH v1-v3: Modify the patch format.

Signed-off-by: Minjie Du <duminjie@vivo.com>
---
 arch/um/drivers/vector_kern.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/arch/um/drivers/vector_kern.c b/arch/um/drivers/vector_kern.c
index 131b7cb29..7ae6ab8df 100644
--- a/arch/um/drivers/vector_kern.c
+++ b/arch/um/drivers/vector_kern.c
@@ -1646,7 +1646,7 @@ static void vector_eth_configure(
 	err = register_netdevice(dev);
 	rtnl_unlock();
 	if (err)
-		goto out_undo_user_init;
+		goto out_free_netdev;
 
 	spin_lock(&vector_devices_lock);
 	list_add(&device->list, &vector_devices);
@@ -1654,8 +1654,6 @@ static void vector_eth_configure(
 
 	return;
 
-out_undo_user_init:
-	return;
 out_free_netdev:
 	free_netdev(dev);
 out_free_device:
-- 
2.39.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-08-21  7:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-06  1:39 [PATCH v4] um: vector: Fix exception handling in vector_eth_configure() Minjie Du
2023-08-19 21:01 ` Richard Weinberger
2023-08-21  7:27   ` Anton Ivanov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®