phy: cadence-torrent: Fix error code in cdns_torrent_phy_probe()
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 17 Dec 2020 11:04:59 +0000 (14:04 +0300)
committerVinod Koul <vkoul@kernel.org>
Wed, 13 Jan 2021 12:01:02 +0000 (17:31 +0530)
This error path should return -EINVAL, but currently it returns
success.

Fixes: d09945eacad0 ("phy: cadence-torrent: Check total lane count for all subnodes is within limit")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/X9s7Wxq+b6ls0q7o@mwanda
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/phy/cadence/phy-cadence-torrent.c

index f310e15..591a158 100644 (file)
@@ -2298,6 +2298,7 @@ static int cdns_torrent_phy_probe(struct platform_device *pdev)
 
        if (total_num_lanes > MAX_NUM_LANES) {
                dev_err(dev, "Invalid lane configuration\n");
+               ret = -EINVAL;
                goto put_lnk_rst;
        }