* [PATCH -next] phy: cadence: Sierra: Fix error return code in cdns_sierra_phy_probe()
@ 2021-05-17 1:57 Wang Wensheng
2021-05-31 8:20 ` Vinod Koul
0 siblings, 1 reply; 2+ messages in thread
From: Wang Wensheng @ 2021-05-17 1:57 UTC (permalink / raw)
To: kishon, vkoul, sjakhade, p.zabel, wangwensheng4, rikard.falkeborn,
sparmar, chunfeng.yun, linux-phy, linux-kernel
Cc: rui.xiang
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 <hulkci@huawei.com>
Signed-off-by: Wang Wensheng <wangwensheng4@huawei.com>
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next] phy: cadence: Sierra: Fix error return code in cdns_sierra_phy_probe()
2021-05-17 1:57 [PATCH -next] phy: cadence: Sierra: Fix error return code in cdns_sierra_phy_probe() Wang Wensheng
@ 2021-05-31 8:20 ` Vinod Koul
0 siblings, 0 replies; 2+ messages in thread
From: Vinod Koul @ 2021-05-31 8:20 UTC (permalink / raw)
To: Wang Wensheng
Cc: kishon, sjakhade, p.zabel, rikard.falkeborn, sparmar,
chunfeng.yun, linux-phy, linux-kernel, rui.xiang
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-05-31 8:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-17 1:57 [PATCH -next] phy: cadence: Sierra: Fix error return code in cdns_sierra_phy_probe() Wang Wensheng
2021-05-31 8:20 ` Vinod Koul
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox