Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

phy: cadence-torrent: Fix error code in cdns_torrent_phy_probe()

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>

authored by

Dan Carpenter and committed by
Vinod Koul
266df28f 915f1d23

+1
+1
drivers/phy/cadence/phy-cadence-torrent.c
··· 2298 2298 2299 2299 if (total_num_lanes > MAX_NUM_LANES) { 2300 2300 dev_err(dev, "Invalid lane configuration\n"); 2301 + ret = -EINVAL; 2301 2302 goto put_lnk_rst; 2302 2303 } 2303 2304