summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWang Wensheng <wangwensheng4@huawei.com>2021-05-17 01:57:49 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-06-16 12:01:45 +0200
commitd83075c25a28e6e8f02e531c8dd4b4e0b58c3ef5 (patch)
treea62fcdb64e67e5f7f089164244a621353a271402
parentc9cb5837e92ee3052e0e46e3cd1eb1f7a903411d (diff)
downloadlinux-stable-d83075c25a28e6e8f02e531c8dd4b4e0b58c3ef5.tar.gz
linux-stable-d83075c25a28e6e8f02e531c8dd4b4e0b58c3ef5.tar.bz2
linux-stable-d83075c25a28e6e8f02e531c8dd4b4e0b58c3ef5.zip
phy: cadence: Sierra: Fix error return code in cdns_sierra_phy_probe()
commit 6411e386db0a477217607015e7d2910d02f75426 upstream. 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> 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>
-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 aaa0bbe473f7..7d990613ce83 100644
--- a/drivers/phy/cadence/phy-cadence-sierra.c
+++ b/drivers/phy/cadence/phy-cadence-sierra.c
@@ -614,6 +614,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;
}