* [PATCHv2 net] net: mdio-ipq4019: add missing error check
@ 2024-11-21 19:31 Rosen Penev
2024-11-22 13:23 ` Andrew Lunn
2024-11-26 10:20 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Rosen Penev @ 2024-11-21 19:31 UTC (permalink / raw)
To: netdev
Cc: Andrew Lunn, Heiner Kallweit, Russell King, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Luo Jie, open list
If an optional resource is found but fails to remap, return on failure.
Avoids any potential problems when using the iomapped resource as the
assumption is that it's available.
Fixes: 23a890d493e3 ("net: mdio: Add the reset function for IPQ MDIO driver")
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
v2: reword and return on error instead.
drivers/net/mdio/mdio-ipq4019.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/mdio/mdio-ipq4019.c b/drivers/net/mdio/mdio-ipq4019.c
index dd3ed2d6430b..d9a94df482d9 100644
--- a/drivers/net/mdio/mdio-ipq4019.c
+++ b/drivers/net/mdio/mdio-ipq4019.c
@@ -352,8 +352,11 @@ static int ipq4019_mdio_probe(struct platform_device *pdev)
/* The platform resource is provided on the chipset IPQ5018 */
/* This resource is optional */
res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
- if (res)
+ if (res) {
priv->eth_ldo_rdy = devm_ioremap_resource(&pdev->dev, res);
+ if (IS_ERR(priv->eth_ldo_rdy))
+ return PTR_ERR(priv->eth_ldo_rdy);
+ }
bus->name = "ipq4019_mdio";
bus->read = ipq4019_mdio_read_c22;
--
2.47.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCHv2 net] net: mdio-ipq4019: add missing error check
2024-11-21 19:31 [PATCHv2 net] net: mdio-ipq4019: add missing error check Rosen Penev
@ 2024-11-22 13:23 ` Andrew Lunn
2024-11-26 10:20 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Andrew Lunn @ 2024-11-22 13:23 UTC (permalink / raw)
To: Rosen Penev
Cc: netdev, Heiner Kallweit, Russell King, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Luo Jie, open list
On Thu, Nov 21, 2024 at 11:31:52AM -0800, Rosen Penev wrote:
> If an optional resource is found but fails to remap, return on failure.
> Avoids any potential problems when using the iomapped resource as the
> assumption is that it's available.
>
> Fixes: 23a890d493e3 ("net: mdio: Add the reset function for IPQ MDIO driver")
> Signed-off-by: Rosen Penev <rosenp@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCHv2 net] net: mdio-ipq4019: add missing error check
2024-11-21 19:31 [PATCHv2 net] net: mdio-ipq4019: add missing error check Rosen Penev
2024-11-22 13:23 ` Andrew Lunn
@ 2024-11-26 10:20 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-11-26 10:20 UTC (permalink / raw)
To: Rosen Penev
Cc: netdev, andrew, hkallweit1, linux, davem, edumazet, kuba, pabeni,
quic_luoj, linux-kernel
Hello:
This patch was applied to netdev/net.git (main)
by Paolo Abeni <pabeni@redhat.com>:
On Thu, 21 Nov 2024 11:31:52 -0800 you wrote:
> If an optional resource is found but fails to remap, return on failure.
> Avoids any potential problems when using the iomapped resource as the
> assumption is that it's available.
>
> Fixes: 23a890d493e3 ("net: mdio: Add the reset function for IPQ MDIO driver")
> Signed-off-by: Rosen Penev <rosenp@gmail.com>
>
> [...]
Here is the summary with links:
- [PATCHv2,net] net: mdio-ipq4019: add missing error check
https://git.kernel.org/netdev/net/c/9cc8d0ecdd2a
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] 3+ messages in thread
end of thread, other threads:[~2024-11-26 10:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-21 19:31 [PATCHv2 net] net: mdio-ipq4019: add missing error check Rosen Penev
2024-11-22 13:23 ` Andrew Lunn
2024-11-26 10:20 ` 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).