From: Markus Elfring <Markus.Elfring@web.de>
To: Finn Thain <fthain@telegraphics.com.au>,
"David S. Miller" <davem@davemloft.net>,
Christophe Jaillet <christophe.jaillet@wanadoo.fr>,
netdev@vger.kernel.org
Cc: "Jakub Kicinski" <kuba@kernel.org>,
"Thomas Bogendörfer" <tsbogend@alpha.franken.de>,
"Chris Zankel" <chris@zankel.net>,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH v2] net/sonic: Fix some resource leaks in error handling paths
Date: Mon, 11 May 2020 09:54:56 +0200 [thread overview]
Message-ID: <f9a2c71b-e001-d546-64cd-8a904ae881ca@web.de> (raw)
In-Reply-To: <3eaa58c16dcf313ff7cb873dcff21659b0ea037d.1589158098.git.fthain@telegraphics.com.au>
> 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
parent reply other threads:[~2020-05-11 7:55 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <3eaa58c16dcf313ff7cb873dcff21659b0ea037d.1589158098.git.fthain@telegraphics.com.au>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f9a2c71b-e001-d546-64cd-8a904ae881ca@web.de \
--to=markus.elfring@web.de \
--cc=chris@zankel.net \
--cc=christophe.jaillet@wanadoo.fr \
--cc=davem@davemloft.net \
--cc=fthain@telegraphics.com.au \
--cc=kernel-janitors@vger.kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=tsbogend@alpha.franken.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®