From: Jan Kiszka <jan.kiszka@siemens.com>
To: "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
MD Danish Anwar <danishanwar@ti.com>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, "Lopes Ivo,
Diogo Miguel (T CED IFD-PT)" <diogo.ivo@siemens.com>,
Nishanth Menon <nm@ti.com>,
"Su, Bao Cheng (RC-CN DF FA R&D)" <baocheng.su@siemens.com>,
Wojciech Drewek <wojciech.drewek@intel.com>,
Roger Quadros <rogerq@kernel.org>
Subject: [PATCH net v4] net: ti: icssg-prueth: Add missing icss_iep_put to error path
Date: Fri, 10 Nov 2023 17:13:02 +0100 [thread overview]
Message-ID: <7a4e5c5b-e397-479b-b1cb-4b50da248f21@siemens.com> (raw)
From: Jan Kiszka <jan.kiszka@siemens.com>
Analogously to prueth_remove, just also taking care for NULL'ing the
iep pointers.
Fixes: 186734c15886 ("net: ti: icssg-prueth: add packet timestamping and ptp support")
Fixes: 443a2367ba3c ("net: ti: icssg-prueth: am65x SR2.0 add 10M full duplex support")
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com>
---
Changes in v4:
- no functional ones
- added one original author in CC with new address (no address of
Grygorii available)
Changes in v3:
- consolidate cleanup logic further [Wojciech]
- make sure to NULL iep pointers
Changes in v2:
- add proper tags
This was lost from the TI SDK version while ripping out SR1.0 support -
which we are currently restoring for upstream.
drivers/net/ethernet/ti/icssg/icssg_prueth.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/ti/icssg/icssg_prueth.c b/drivers/net/ethernet/ti/icssg/icssg_prueth.c
index 6c4b64227ac8..3abbeba26f1b 100644
--- a/drivers/net/ethernet/ti/icssg/icssg_prueth.c
+++ b/drivers/net/ethernet/ti/icssg/icssg_prueth.c
@@ -2105,10 +2105,7 @@ static int prueth_probe(struct platform_device *pdev)
prueth->iep1 = icss_iep_get_idx(np, 1);
if (IS_ERR(prueth->iep1)) {
ret = dev_err_probe(dev, PTR_ERR(prueth->iep1), "iep1 get failed\n");
- icss_iep_put(prueth->iep0);
- prueth->iep0 = NULL;
- prueth->iep1 = NULL;
- goto free_pool;
+ goto put_iep0;
}
if (prueth->pdata.quirk_10m_link_issue) {
@@ -2205,6 +2202,12 @@ static int prueth_probe(struct platform_device *pdev)
exit_iep:
if (prueth->pdata.quirk_10m_link_issue)
icss_iep_exit_fw(prueth->iep1);
+ icss_iep_put(prueth->iep1);
+
+put_iep0:
+ icss_iep_put(prueth->iep0);
+ prueth->iep0 = NULL;
+ prueth->iep1 = NULL;
free_pool:
gen_pool_free(prueth->sram_pool,
--
2.35.3
next reply other threads:[~2023-11-10 18:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-10 16:13 Jan Kiszka [this message]
2023-11-10 16:18 ` Anwar, Md Danish
2023-11-11 16:12 ` Roger Quadros
2023-11-11 19:51 ` patchwork-bot+netdevbpf
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=7a4e5c5b-e397-479b-b1cb-4b50da248f21@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=baocheng.su@siemens.com \
--cc=danishanwar@ti.com \
--cc=davem@davemloft.net \
--cc=diogo.ivo@siemens.com \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nm@ti.com \
--cc=pabeni@redhat.com \
--cc=rogerq@kernel.org \
--cc=wojciech.drewek@intel.com \
/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®