* [PATCH] phy: rockchip: inno-usb2: Handle errors from optional IRQ lookup
@ 2026-08-11 4:09 ` phucduc.bui
0 siblings, 0 replies; 3+ messages in thread
From: phucduc.bui @ 2026-08-11 4:09 UTC (permalink / raw)
To: Vinod Koul, Neil Armstrong, linux-phy, linux-arm-kernel,
linux-rockchip, linux-kernel
Cc: Heiko Stuebner, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
platform_get_irq_optional() can return errors such as -EPROBE_DEFER,
but the driver currently stores the return value directly in rphy->irq
and continues probing.
Propagate negative errors other than -ENXIO using dev_err_probe(), and
only assign the IRQ to rphy->irq when a valid IRQ number is returned.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
index 7d8a533f24ae..6079e776b4bb 100644
--- a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
+++ b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
@@ -1390,7 +1390,12 @@ static int rockchip_usb2phy_probe(struct platform_device *pdev)
phy_cfgs = device_get_match_data(dev);
rphy->chg_state = USB_CHG_STATE_UNDEFINED;
rphy->chg_type = POWER_SUPPLY_TYPE_UNKNOWN;
- rphy->irq = platform_get_irq_optional(pdev, 0);
+ ret = platform_get_irq_optional(pdev, 0);
+ if (ret < 0 && ret != -ENXIO)
+ return dev_err_probe(dev, ret, "failed to get IRQ resource\n");
+ if (ret > 0)
+ rphy->irq = ret;
+
platform_set_drvdata(pdev, rphy);
if (!phy_cfgs)
--
2.43.0
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] phy: rockchip: inno-usb2: Handle errors from optional IRQ lookup
@ 2026-08-11 4:09 ` phucduc.bui
0 siblings, 0 replies; 3+ messages in thread
From: phucduc.bui @ 2026-08-11 4:09 UTC (permalink / raw)
To: Vinod Koul, Neil Armstrong, linux-phy, linux-arm-kernel,
linux-rockchip, linux-kernel
Cc: Heiko Stuebner, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
platform_get_irq_optional() can return errors such as -EPROBE_DEFER,
but the driver currently stores the return value directly in rphy->irq
and continues probing.
Propagate negative errors other than -ENXIO using dev_err_probe(), and
only assign the IRQ to rphy->irq when a valid IRQ number is returned.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
index 7d8a533f24ae..6079e776b4bb 100644
--- a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
+++ b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
@@ -1390,7 +1390,12 @@ static int rockchip_usb2phy_probe(struct platform_device *pdev)
phy_cfgs = device_get_match_data(dev);
rphy->chg_state = USB_CHG_STATE_UNDEFINED;
rphy->chg_type = POWER_SUPPLY_TYPE_UNKNOWN;
- rphy->irq = platform_get_irq_optional(pdev, 0);
+ ret = platform_get_irq_optional(pdev, 0);
+ if (ret < 0 && ret != -ENXIO)
+ return dev_err_probe(dev, ret, "failed to get IRQ resource\n");
+ if (ret > 0)
+ rphy->irq = ret;
+
platform_set_drvdata(pdev, rphy);
if (!phy_cfgs)
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] phy: rockchip: inno-usb2: Handle errors from optional IRQ lookup
@ 2026-08-11 4:09 ` phucduc.bui
0 siblings, 0 replies; 3+ messages in thread
From: phucduc.bui @ 2026-08-11 4:09 UTC (permalink / raw)
To: Vinod Koul, Neil Armstrong, linux-phy, linux-arm-kernel,
linux-rockchip, linux-kernel
Cc: Heiko Stuebner, bui duc phuc
From: bui duc phuc <phucduc.bui@gmail.com>
platform_get_irq_optional() can return errors such as -EPROBE_DEFER,
but the driver currently stores the return value directly in rphy->irq
and continues probing.
Propagate negative errors other than -ENXIO using dev_err_probe(), and
only assign the IRQ to rphy->irq when a valid IRQ number is returned.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
index 7d8a533f24ae..6079e776b4bb 100644
--- a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
+++ b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c
@@ -1390,7 +1390,12 @@ static int rockchip_usb2phy_probe(struct platform_device *pdev)
phy_cfgs = device_get_match_data(dev);
rphy->chg_state = USB_CHG_STATE_UNDEFINED;
rphy->chg_type = POWER_SUPPLY_TYPE_UNKNOWN;
- rphy->irq = platform_get_irq_optional(pdev, 0);
+ ret = platform_get_irq_optional(pdev, 0);
+ if (ret < 0 && ret != -ENXIO)
+ return dev_err_probe(dev, ret, "failed to get IRQ resource\n");
+ if (ret > 0)
+ rphy->irq = ret;
+
platform_set_drvdata(pdev, rphy);
if (!phy_cfgs)
--
2.43.0
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-08-11 4:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-11 4:09 [PATCH] phy: rockchip: inno-usb2: Handle errors from optional IRQ lookup phucduc.bui
2026-08-11 4:09 ` phucduc.bui
2026-08-11 4:09 ` phucduc.bui
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.