* [PATCH net v4] net: ti: icssg-prueth: Add missing icss_iep_put to error path
@ 2023-11-10 16:13 Jan Kiszka
2023-11-10 16:18 ` Anwar, Md Danish
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Jan Kiszka @ 2023-11-10 16:13 UTC (permalink / raw)
To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
MD Danish Anwar
Cc: netdev, linux-kernel, Lopes Ivo, Diogo Miguel (T CED IFD-PT),
Nishanth Menon, Su, Bao Cheng (RC-CN DF FA R&D),
Wojciech Drewek, Roger Quadros
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net v4] net: ti: icssg-prueth: Add missing icss_iep_put to error path
2023-11-10 16:13 [PATCH net v4] net: ti: icssg-prueth: Add missing icss_iep_put to error path Jan Kiszka
@ 2023-11-10 16:18 ` Anwar, Md Danish
2023-11-11 16:12 ` Roger Quadros
2023-11-11 19:51 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Anwar, Md Danish @ 2023-11-10 16:18 UTC (permalink / raw)
To: Jan Kiszka, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, MD Danish Anwar
Cc: netdev, linux-kernel, Lopes Ivo, Diogo Miguel (T CED IFD-PT),
Nishanth Menon, Su, Bao Cheng (RC-CN DF FA R&D),
Wojciech Drewek, Roger Quadros
On 11/10/2023 9:43 PM, Jan Kiszka wrote:
> 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>
Reviewed-by: MD Danish Anwar <danishanwar@ti.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,
--
Thanks and Regards,
Md Danish Anwar
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net v4] net: ti: icssg-prueth: Add missing icss_iep_put to error path
2023-11-10 16:13 [PATCH net v4] net: ti: icssg-prueth: Add missing icss_iep_put to error path Jan Kiszka
2023-11-10 16:18 ` Anwar, Md Danish
@ 2023-11-11 16:12 ` Roger Quadros
2023-11-11 19:51 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Roger Quadros @ 2023-11-11 16:12 UTC (permalink / raw)
To: Jan Kiszka, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, MD Danish Anwar
Cc: netdev, linux-kernel, Lopes Ivo, Diogo Miguel (T CED IFD-PT),
Nishanth Menon, Su, Bao Cheng (RC-CN DF FA R&D),
Wojciech Drewek
On 10/11/2023 18:13, Jan Kiszka wrote:
> 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>
Reviewed-by: Roger Quadros <rogerq@kernel.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net v4] net: ti: icssg-prueth: Add missing icss_iep_put to error path
2023-11-10 16:13 [PATCH net v4] net: ti: icssg-prueth: Add missing icss_iep_put to error path Jan Kiszka
2023-11-10 16:18 ` Anwar, Md Danish
2023-11-11 16:12 ` Roger Quadros
@ 2023-11-11 19:51 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-11-11 19:51 UTC (permalink / raw)
To: Jan Kiszka
Cc: davem, edumazet, kuba, pabeni, danishanwar, netdev, linux-kernel,
diogo.ivo, nm, baocheng.su, wojciech.drewek, rogerq
Hello:
This patch was applied to netdev/net.git (main)
by David S. Miller <davem@davemloft.net>:
On Fri, 10 Nov 2023 17:13:02 +0100 you wrote:
> 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>
>
> [...]
Here is the summary with links:
- [net,v4] net: ti: icssg-prueth: Add missing icss_iep_put to error path
https://git.kernel.org/netdev/net/c/e409d7346648
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-11-11 19:51 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-10 16:13 [PATCH net v4] net: ti: icssg-prueth: Add missing icss_iep_put to error path Jan Kiszka
2023-11-10 16:18 ` Anwar, Md Danish
2023-11-11 16:12 ` Roger Quadros
2023-11-11 19:51 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).