aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWang Wensheng <[email protected]>2021-05-17 01:57:49 +0000
committerVinod Koul <[email protected]>2021-05-31 13:50:05 +0530
commit6411e386db0a477217607015e7d2910d02f75426 (patch)
tree65ef8cddffe5873b84c248ffc20bbb4196f73bec
parent7c2fc79250cafa1a29befeb60163028ec4720814 (diff)
phy: cadence: Sierra: Fix error return code in cdns_sierra_phy_probe()
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 <[email protected]> Signed-off-by: Wang Wensheng <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
-rw-r--r--drivers/phy/cadence/phy-cadence-sierra.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/phy/cadence/phy-cadence-sierra.c b/drivers/phy/cadence/phy-cadence-sierra.c
index 5c68e31c5939..e93818e3991f 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;
}