phy: cadence: Sierra: Fix error return code in cdns_sierra_phy_probe()
commit6411e386dbupstream. Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes:a43f72ae13("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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
c9cb5837e9
commit
d83075c25a
@@ -614,6 +614,7 @@ static int cdns_sierra_phy_probe(struct platform_device *pdev)
|
|||||||
sp->nsubnodes = node;
|
sp->nsubnodes = node;
|
||||||
|
|
||||||
if (sp->num_lanes > SIERRA_MAX_LANES) {
|
if (sp->num_lanes > SIERRA_MAX_LANES) {
|
||||||
|
ret = -EINVAL;
|
||||||
dev_err(dev, "Invalid lane configuration\n");
|
dev_err(dev, "Invalid lane configuration\n");
|
||||||
goto put_child2;
|
goto put_child2;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user