diff options
author | Zhang Changzhong <zhangchangzhong@huawei.com> | 2020-11-13 14:49:33 +0800 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2020-11-16 15:37:28 -0800 |
commit | 35f735c665114840dcd3142f41148d07870f51f7 (patch) | |
tree | 57cd71b1a211247730f96449d8fa0725a5c59e06 /drivers/net/ethernet | |
parent | 661710bfd5039267f911e42675ab743760b6449d (diff) | |
download | linux-stable-35f735c665114840dcd3142f41148d07870f51f7.tar.gz linux-stable-35f735c665114840dcd3142f41148d07870f51f7.tar.bz2 linux-stable-35f735c665114840dcd3142f41148d07870f51f7.zip |
net: ethernet: ti: cpsw: fix error return code in cpsw_probe()
Fix to return a negative error code from the error handling
case instead of 0, as done elsewhere in this function.
Fixes: 83a8471ba255 ("net: ethernet: ti: cpsw: refactor probe to group common hw initialization")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com>
Link: https://lore.kernel.org/r/1605250173-18438-1-git-send-email-zhangchangzhong@huawei.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r-- | drivers/net/ethernet/ti/cpsw.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index fa2d1025cbb2..b0f00b4edd94 100644 --- a/drivers/net/ethernet/ti/cpsw.c +++ b/drivers/net/ethernet/ti/cpsw.c @@ -1634,6 +1634,7 @@ static int cpsw_probe(struct platform_device *pdev) CPSW_MAX_QUEUES, CPSW_MAX_QUEUES); if (!ndev) { dev_err(dev, "error allocating net_device\n"); + ret = -ENOMEM; goto clean_cpts; } |