diff options
author | Dan Carpenter <dan.carpenter@linaro.org> | 2024-07-04 18:19:44 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-07-06 03:13:57 +0300 |
commit | 0c754d9d86ffdf2f86b4272b25d759843fb62fd8 (patch) | |
tree | f811e0ccfeebff5b28ff5cda4b4b7eaba8007815 /drivers/net/ethernet/broadcom/asp2 | |
parent | 0005b2dc43f96b93fc5b0850d7ca3f7aeac9129c (diff) | |
download | linux-0c754d9d86ffdf2f86b4272b25d759843fb62fd8.tar.xz |
net: bcmasp: Fix error code in probe()
Return an error code if bcmasp_interface_create() fails. Don't return
success.
Fixes: 490cb412007d ("net: bcmasp: Add support for ASP2.0 Ethernet controller")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Michal Kubiak <michal.kubiak@intel.com>
Reviewed-by: Justin Chen <justin.chen@broadcom.com>
Link: https://patch.msgid.link/ZoWKBkHH9D1fqV4r@stanley.mountain
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/broadcom/asp2')
-rw-r--r-- | drivers/net/ethernet/broadcom/asp2/bcmasp.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/broadcom/asp2/bcmasp.c b/drivers/net/ethernet/broadcom/asp2/bcmasp.c index a806dadc4196..20c6529ec135 100644 --- a/drivers/net/ethernet/broadcom/asp2/bcmasp.c +++ b/drivers/net/ethernet/broadcom/asp2/bcmasp.c @@ -1380,6 +1380,7 @@ static int bcmasp_probe(struct platform_device *pdev) dev_err(dev, "Cannot create eth interface %d\n", i); bcmasp_remove_intfs(priv); of_node_put(intf_node); + ret = -ENOMEM; goto of_put_exit; } list_add_tail(&intf->list, &priv->intfs); |