Skip to content

Commit

Permalink
net: ethernet: ti: cpsw: fix error return code in cpsw_probe()
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Zhang Changzhong <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
  • Loading branch information
Zhang Changzhong authored and kuba-moo committed Nov 16, 2020
1 parent 661710b commit 35f735c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/ethernet/ti/cpsw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 35f735c

Please sign in to comment.