From: Markus Elfring <Markus.Elfring@web.de>
To: Wen Yang <wen.yang99@zte.com.cn>,
"David S. Miller" <davem@davemloft.net>,
netdev@vger.kernel.org, kernel-janitors@vger.kernel.org
Cc: Yi Wang <wang.yi59@zte.com.cn>,
Michal Simek <michal.simek@xilinx.com>,
linux-kernel@vger.kernel.org,
Anirudha Sarangi <anirudh@xilinx.com>,
John Linn <John.Linn@xilinx.com>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/3] net: xilinx: fix possible object reference leak
Date: Fri, 5 Apr 2019 09:54:45 +0200 [thread overview]
Message-ID: <d2f169a0-b982-82ca-b2f1-963b8a579504@web.de> (raw)
In-Reply-To: <1553223849-7143-1-git-send-email-wen.yang99@zte.com.cn>
> @@ -1575,12 +1575,14 @@ static int axienet_probe(struct platform_device *pdev)
> ret = of_address_to_resource(np, 0, &dmares);
> if (ret) {
> dev_err(&pdev->dev, "unable to get DMA resource\n");
> + of_node_put(np);
> goto free_netdev;
> }
> lp->dma_regs = devm_ioremap_resource(&pdev->dev, &dmares);
> if (IS_ERR(lp->dma_regs)) {
> dev_err(&pdev->dev, "could not map DMA regs\n");
> ret = PTR_ERR(lp->dma_regs);
> + of_node_put(np);
> goto free_netdev;
> }
How do you think about to move these put calls to an additional
jump target for the desired exception handling?
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/drivers/net/ethernet/xilinx/xilinx_axienet_main.c?id=fa3a419d2f674b431d38748cb58fb7da17ee8949#n1621
Regards,
Markus
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-04-05 7:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-22 3:04 [PATCH 1/3] net: xilinx: fix possible object reference leak Wen Yang
2019-03-24 1:21 ` David Miller
2019-04-05 7:54 ` Markus Elfring [this message]
2019-04-05 8:13 ` Dan Carpenter
2019-04-05 9:18 ` [1/3] " Markus Elfring
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=d2f169a0-b982-82ca-b2f1-963b8a579504@web.de \
--to=markus.elfring@web.de \
--cc=John.Linn@xilinx.com \
--cc=anirudh@xilinx.com \
--cc=davem@davemloft.net \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.simek@xilinx.com \
--cc=netdev@vger.kernel.org \
--cc=wang.yi59@zte.com.cn \
--cc=wen.yang99@zte.com.cn \
/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