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

net: ethernet: altera: TSE: fix error return code in altera_tse_probe()

Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.

Fixes: fef2998203e1 ("net: altera: tse: convert to phylink")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Sun Ke <sunke32@huawei.com>
Link: https://lore.kernel.org/r/20220920020041.2685948-1-sunke32@huawei.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>

authored by

Sun Ke and committed by
Paolo Abeni
9b17dbd9 7a5d48c4

+1
+1
drivers/net/ethernet/altera/altera_tse_main.c
··· 1411 1411 priv->phy_iface, &alt_tse_phylink_ops); 1412 1412 if (IS_ERR(priv->phylink)) { 1413 1413 dev_err(&pdev->dev, "failed to create phylink\n"); 1414 + ret = PTR_ERR(priv->phylink); 1414 1415 goto err_init_phy; 1415 1416 } 1416 1417