Skip to content

Commit 2913085

Browse files
Wei Yongjundavem330
authored andcommitted
dpaa_eth: fix error return code in dpaa_eth_probe()
Fix to return a negative error code from the dpaa_bp_alloc() error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent c221fe4 commit 2913085

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/net/ethernet/freescale/dpaa/dpaa_eth.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2728,11 +2728,11 @@ static int dpaa_eth_probe(struct platform_device *pdev)
27282728

27292729
/* bp init */
27302730
for (i = 0; i < DPAA_BPS_NUM; i++) {
2731-
int err;
2732-
27332731
dpaa_bps[i] = dpaa_bp_alloc(dev);
2734-
if (IS_ERR(dpaa_bps[i]))
2732+
if (IS_ERR(dpaa_bps[i])) {
2733+
err = PTR_ERR(dpaa_bps[i]);
27352734
goto free_dpaa_bps;
2735+
}
27362736
/* the raw size of the buffers used for reception */
27372737
dpaa_bps[i]->raw_size = bpool_buffer_raw_size(i, DPAA_BPS_NUM);
27382738
/* avoid runtime computations by keeping the usable size here */

0 commit comments

Comments
 (0)