* Re: [PATCH v2] net/sonic: Fix some resource leaks in error handling paths
[not found] <3eaa58c16dcf313ff7cb873dcff21659b0ea037d.1589158098.git.fthain@telegraphics.com.au>
@ 2020-05-11 7:54 ` Markus Elfring
0 siblings, 0 replies; 2+ messages in thread
From: Markus Elfring @ 2020-05-11 7:54 UTC (permalink / raw)
To: Finn Thain, David S. Miller, Christophe Jaillet, netdev
Cc: Jakub Kicinski, Thomas Bogendörfer, Chris Zankel,
linux-kernel, kernel-janitors
> Changed since v1:
> - Improved commit log slightly.
> - Changed 'undo_probe1' to 'undo_probe' where appropriate.
I find this response interesting.
> ---
I suggest to replace these triple dashes by a blank line.
> drivers/net/ethernet/natsemi/macsonic.c | 17 +++++++++++++----
> drivers/net/ethernet/natsemi/xtsonic.c | 7 +++++--
I imagine that this change combination will need further clarification
because David Miller provided the information “Applied, thanks.” on 2020-04-27.
net/sonic: Fix a resource leak in an error handling path in 'jazz_sonic_probe()'
https://lore.kernel.org/patchwork/comment/1426045/
https://lkml.org/lkml/2020/4/27/1014
…
> +++ b/drivers/net/ethernet/natsemi/xtsonic.c
> @@ -229,11 +229,14 @@ int xtsonic_probe(struct platform_device *pdev)
> sonic_msg_init(dev);
>
> if ((err = register_netdev(dev)))
> - goto out1;
> + goto undo_probe1;
>
> return 0;
>
> -out1:
> +undo_probe1:
> + dma_free_coherent(lp->device,
> + SIZEOF_SONIC_DESC * SONIC_BUS_SCALE(lp->dma_bitmode),
> + lp->descriptors, lp->descriptors_laddr);
> release_region(dev->base_addr, SONIC_MEM_SIZE);
> out:
…
Can it be nicer to use the label “free_dma”?
Regards,
Markus
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH v2] net/sonic: Fix some resource leaks in error handling paths
@ 2020-05-11 7:54 ` Markus Elfring
0 siblings, 0 replies; 2+ messages in thread
From: Markus Elfring @ 2020-05-11 7:54 UTC (permalink / raw)
To: Finn Thain, David S. Miller, Christophe Jaillet, netdev
Cc: Jakub Kicinski, Thomas Bogendörfer, Chris Zankel,
linux-kernel, kernel-janitors
> Changed since v1:
> - Improved commit log slightly.
> - Changed 'undo_probe1' to 'undo_probe' where appropriate.
I find this response interesting.
> ---
I suggest to replace these triple dashes by a blank line.
> drivers/net/ethernet/natsemi/macsonic.c | 17 +++++++++++++----
> drivers/net/ethernet/natsemi/xtsonic.c | 7 +++++--
I imagine that this change combination will need further clarification
because David Miller provided the information “Applied, thanks.” on 2020-04-27.
net/sonic: Fix a resource leak in an error handling path in 'jazz_sonic_probe()'
https://lore.kernel.org/patchwork/comment/1426045/
https://lkml.org/lkml/2020/4/27/1014
…
> +++ b/drivers/net/ethernet/natsemi/xtsonic.c
> @@ -229,11 +229,14 @@ int xtsonic_probe(struct platform_device *pdev)
> sonic_msg_init(dev);
>
> if ((err = register_netdev(dev)))
> - goto out1;
> + goto undo_probe1;
>
> return 0;
>
> -out1:
> +undo_probe1:
> + dma_free_coherent(lp->device,
> + SIZEOF_SONIC_DESC * SONIC_BUS_SCALE(lp->dma_bitmode),
> + lp->descriptors, lp->descriptors_laddr);
> release_region(dev->base_addr, SONIC_MEM_SIZE);
> out:
…
Can it be nicer to use the label “free_dma”?
Regards,
Markus
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-05-11 7:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <3eaa58c16dcf313ff7cb873dcff21659b0ea037d.1589158098.git.fthain@telegraphics.com.au>
2020-05-11 7:54 ` [PATCH v2] net/sonic: Fix some resource leaks in error handling paths Markus Elfring
2020-05-11 7:54 ` Markus Elfring
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.