diff options
Diffstat (limited to 'drivers/net/ethernet/cavium/thunder/thunder_bgx.c')
| -rw-r--r-- | drivers/net/ethernet/cavium/thunder/thunder_bgx.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/cavium/thunder/thunder_bgx.c b/drivers/net/ethernet/cavium/thunder/thunder_bgx.c index 5d08d2aeb172..e337da6ba2a4 100644 --- a/drivers/net/ethernet/cavium/thunder/thunder_bgx.c +++ b/drivers/net/ethernet/cavium/thunder/thunder_bgx.c | |||
| @@ -1083,6 +1083,8 @@ static int bgx_lmac_enable(struct bgx *bgx, u8 lmacid) | |||
| 1083 | lmac->dmacs_count = (RX_DMAC_COUNT / bgx->lmac_count); | 1083 | lmac->dmacs_count = (RX_DMAC_COUNT / bgx->lmac_count); |
| 1084 | lmac->dmacs = kcalloc(lmac->dmacs_count, sizeof(*lmac->dmacs), | 1084 | lmac->dmacs = kcalloc(lmac->dmacs_count, sizeof(*lmac->dmacs), |
| 1085 | GFP_KERNEL); | 1085 | GFP_KERNEL); |
| 1086 | if (!lmac->dmacs) | ||
| 1087 | return -ENOMEM; | ||
| 1086 | 1088 | ||
| 1087 | /* Enable lmac */ | 1089 | /* Enable lmac */ |
| 1088 | bgx_reg_modify(bgx, lmacid, BGX_CMRX_CFG, CMR_EN); | 1090 | bgx_reg_modify(bgx, lmacid, BGX_CMRX_CFG, CMR_EN); |
