Skip to content

Commit 6411e38

Browse files
Wang Wenshengvinodkoul
authored andcommitted
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: a43f72a ("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]>
1 parent 7c2fc79 commit 6411e38

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/phy/cadence/phy-cadence-sierra.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -940,6 +940,7 @@ static int cdns_sierra_phy_probe(struct platform_device *pdev)
940940
sp->nsubnodes = node;
941941

942942
if (sp->num_lanes > SIERRA_MAX_LANES) {
943+
ret = -EINVAL;
943944
dev_err(dev, "Invalid lane configuration\n");
944945
goto put_child2;
945946
}

0 commit comments

Comments
 (0)