linux-um.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] drivers: use free_netdev before return
@ 2023-07-03 13:11 Minjie Du
  2023-07-03 13:19 ` Anton Ivanov
  2023-07-03 14:05 ` [PATCH v2] drivers: use free_netdev before return in vector_eth_configure() Markus Elfring
  0 siblings, 2 replies; 3+ messages in thread
From: Minjie Du @ 2023-07-03 13:11 UTC (permalink / raw)
  To: richard, anton.ivanov, johannes, sfr, linux-um, linux-kernel,
	11162212
  Cc: opensource.kernel, Minjie Du

We will replace the old version of 
undo_user_init and use out_free_netdev

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

diff --git a/arch/um/drivers/vector_kern.c b/arch/um/drivers/vector_kern.c
index af7f6fd4c..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,9 +1654,6 @@ static void vector_eth_configure(
 
 	return;
 
-out_undo_user_init:
-	free_netdev(dev);
-	return;
 out_free_netdev:
 	free_netdev(dev);
 out_free_device:
-- 
2.39.0


_______________________________________________
linux-um mailing list
linux-um@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-um

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

* Re: [PATCH v2] drivers: use free_netdev before return
  2023-07-03 13:11 [PATCH v2] drivers: use free_netdev before return Minjie Du
@ 2023-07-03 13:19 ` Anton Ivanov
  2023-07-03 14:05 ` [PATCH v2] drivers: use free_netdev before return in vector_eth_configure() Markus Elfring
  1 sibling, 0 replies; 3+ messages in thread
From: Anton Ivanov @ 2023-07-03 13:19 UTC (permalink / raw)
  To: Minjie Du, richard, johannes, sfr, linux-um, linux-kernel,
	11162212
  Cc: opensource.kernel



On 03/07/2023 14:11, Minjie Du wrote:
> We will replace the old version of
> undo_user_init and use out_free_netdev
> 
> Signed-off-by: Minjie Du <duminjie@vivo.com>
> ---
>   arch/um/drivers/vector_kern.c | 5 +----
>   1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/arch/um/drivers/vector_kern.c b/arch/um/drivers/vector_kern.c
> index af7f6fd4c..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,9 +1654,6 @@ static void vector_eth_configure(
>   
>   	return;
>   
> -out_undo_user_init:
> -	free_netdev(dev);
> -	return;
>   out_free_netdev:
>   	free_netdev(dev);
>   out_free_device:

Acked-By: "Anton Ivanov" <anton.ivanov@cambridgegreys.com>

-- 
Anton R. Ivanov
Cambridgegreys Limited. Registered in England. Company Number 10273661
https://www.cambridgegreys.com/

_______________________________________________
linux-um mailing list
linux-um@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-um

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

* Re: [PATCH v2] drivers: use free_netdev before return in vector_eth_configure()
  2023-07-03 13:11 [PATCH v2] drivers: use free_netdev before return Minjie Du
  2023-07-03 13:19 ` Anton Ivanov
@ 2023-07-03 14:05 ` Markus Elfring
  1 sibling, 0 replies; 3+ messages in thread
From: Markus Elfring @ 2023-07-03 14:05 UTC (permalink / raw)
  To: Minjie Du, linux-um, kernel-janitors, Anton Ivanov, Johannes Berg,
	Richard Weinberger, Stephen Rothwell, 11162212
  Cc: LKML, opensource.kernel

Would the information “um: vector: …” be more appropriate
for the subsystem specification in the patch subject?



> We will replace the old version of
> undo_user_init and use out_free_netdev

Please choose a better imperative change suggestion.

See also:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.4#n94


How do you think about to add the tag “Fixes”?

Regards,
Markus

_______________________________________________
linux-um mailing list
linux-um@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-um

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

end of thread, other threads:[~2023-07-03 14:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-03 13:11 [PATCH v2] drivers: use free_netdev before return Minjie Du
2023-07-03 13:19 ` Anton Ivanov
2023-07-03 14:05 ` [PATCH v2] drivers: use free_netdev before return in vector_eth_configure() Markus Elfring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).