Skip to content

Commit 35f735c

Browse files
Zhang Changzhongkuba-moo
authored andcommitted
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: 83a8471 ("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>
1 parent 661710b commit 35f735c

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

drivers/net/ethernet/ti/cpsw.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1634,6 +1634,7 @@ static int cpsw_probe(struct platform_device *pdev)
16341634
CPSW_MAX_QUEUES, CPSW_MAX_QUEUES);
16351635
if (!ndev) {
16361636
dev_err(dev, "error allocating net_device\n");
1637+
ret = -ENOMEM;
16371638
goto clean_cpts;
16381639
}
16391640

0 commit comments

Comments
 (0)