Skip to content

Commit d83075c

Browse files
Wang Wenshenggregkh
authored andcommitted
phy: cadence: Sierra: Fix error return code in cdns_sierra_phy_probe()
commit 6411e38 upstream. 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 <hulkci@huawei.com> Signed-off-by: Wang Wensheng <wangwensheng4@huawei.com> Link: https://lore.kernel.org/r/20210517015749.127799-1-wangwensheng4@huawei.com Signed-off-by: Vinod Koul <vkoul@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent c9cb583 commit d83075c

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

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

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

616616
if (sp->num_lanes > SIERRA_MAX_LANES) {
617+
ret = -EINVAL;
617618
dev_err(dev, "Invalid lane configuration\n");
618619
goto put_child2;
619620
}

0 commit comments

Comments
 (0)