From: Markus Elfring <Markus.Elfring@web.de>
To: Wen Yang <wen.yang99@zte.com.cn>,
"David S. Miller" <davem@davemloft.net>,
kernel-janitors@vger.kernel.org, netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
Murali Karicheri <m-karicheri2@ti.com>,
Wingman Kwok <w-kwok2@ti.com>, Yi Wang <wang.yi59@zte.com.cn>
Subject: Re: [PATCH 3/3] ethernet: ti: fix possible object reference leak
Date: Fri, 5 Apr 2019 10:27:59 +0200 [thread overview]
Message-ID: <1a90f282-4664-f9e6-45d1-7b3b6a0a3104@web.de> (raw)
In-Reply-To: <1553223849-7143-3-git-send-email-wen.yang99@zte.com.cn>
> @@ -3657,12 +3657,16 @@ static int gbe_probe(struct netcp_device *netcp_device, struct device *dev,
>
> ret = netcp_txpipe_init(&gbe_dev->tx_pipe, netcp_device,
> gbe_dev->dma_chan_name, gbe_dev->tx_queue_id);
> - if (ret)
> + if (ret) {
> + of_node_put(interfaces);
> return ret;
> + }
>
> ret = netcp_txpipe_open(&gbe_dev->tx_pipe);
> - if (ret)
> + if (ret) {
> + of_node_put(interfaces);
> return ret;
> + }
>
> /* Create network interfaces */
> INIT_LIST_HEAD(&gbe_dev->gbe_intf_head);
Would you like to move such duplicate statements to an additional jump target
for the desired exception handling?
Regards,
Markus
next prev parent reply other threads:[~2019-04-05 8:28 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-22 3:04 [PATCH 1/3] net: xilinx: " Wen Yang
2019-03-22 3:04 ` [PATCH 2/3] net: ibm: " Wen Yang
2019-03-24 1:21 ` David Miller
2019-03-22 3:04 ` [PATCH 3/3] net: ethernet: ti: " Wen Yang
2019-03-24 1:22 ` David Miller
2019-04-05 8:27 ` Markus Elfring [this message]
2019-03-24 1:21 ` [PATCH 1/3] net: xilinx: " David Miller
2019-04-05 7:54 ` Markus Elfring
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=1a90f282-4664-f9e6-45d1-7b3b6a0a3104@web.de \
--to=markus.elfring@web.de \
--cc=davem@davemloft.net \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=m-karicheri2@ti.com \
--cc=netdev@vger.kernel.org \
--cc=w-kwok2@ti.com \
--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
all inboxes | Powered by JetHome®