[PATCH -next] phy: cadence: Sierra: Fix error return code in cdns_sierra_phy_probe()

Subsystems: generic phy framework, the rest

STALE1939d LANDED

Landed in mainline as 6411e386db0a on 2021-05-31.

2 messages, 2 authors, 2021-05-31 · open the first message on its own page

[PATCH -next] phy: cadence: Sierra: Fix error return code in cdns_sierra_phy_probe()

From: Wang Wensheng <hidden>
Date: 2021-05-17 01:58:46

Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.

Fixes: a43f72ae136a ("phy: cadence: Sierra: Change MAX_LANES of Sierra to 16")
Reported-by: Hulk Robot <redacted>
Signed-off-by: Wang Wensheng <redacted>
---
 drivers/phy/cadence/phy-cadence-sierra.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/drivers/phy/cadence/phy-cadence-sierra.c b/drivers/phy/cadence/phy-cadence-sierra.c
index 5c68e31..e93818e 100644
--- a/drivers/phy/cadence/phy-cadence-sierra.c
+++ b/drivers/phy/cadence/phy-cadence-sierra.c
@@ -940,6 +940,7 @@ static int cdns_sierra_phy_probe(struct platform_device *pdev)
 	sp->nsubnodes = node;
 
 	if (sp->num_lanes > SIERRA_MAX_LANES) {
+		ret = -EINVAL;
 		dev_err(dev, "Invalid lane configuration\n");
 		goto put_child2;
 	}
-- 
2.9.4


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

Re: [PATCH -next] phy: cadence: Sierra: Fix error return code in cdns_sierra_phy_probe()

From: Vinod Koul <vkoul@kernel.org>
Date: 2021-05-31 08:20:45

On 17-05-21, 01:57, Wang Wensheng wrote:
Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.
Applied, thanks

-- 
~Vinod

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help