diff options
Diffstat (limited to 'drivers/staging/sbe-2t3e3/dc.c')
-rw-r--r-- | drivers/staging/sbe-2t3e3/dc.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/staging/sbe-2t3e3/dc.c b/drivers/staging/sbe-2t3e3/dc.c index daadd6e..f207b9e 100644 --- a/drivers/staging/sbe-2t3e3/dc.c +++ b/drivers/staging/sbe-2t3e3/dc.c @@ -315,20 +315,17 @@ static int dc_init_descriptor_list(struct channel *sc) struct sk_buff *m; if (sc->ether.rx_ring == NULL) - sc->ether.rx_ring = kzalloc(SBE_2T3E3_RX_DESC_RING_SIZE * + sc->ether.rx_ring = kcalloc(SBE_2T3E3_RX_DESC_RING_SIZE, sizeof(t3e3_rx_desc_t), GFP_KERNEL); - if (sc->ether.rx_ring == NULL) { - dev_err(&sc->pdev->dev, "SBE 2T3E3: no buffer space for RX ring\n"); + if (sc->ether.rx_ring == NULL) return -ENOMEM; - } if (sc->ether.tx_ring == NULL) - sc->ether.tx_ring = kzalloc(SBE_2T3E3_TX_DESC_RING_SIZE * + sc->ether.tx_ring = kcalloc(SBE_2T3E3_TX_DESC_RING_SIZE, sizeof(t3e3_tx_desc_t), GFP_KERNEL); if (sc->ether.tx_ring == NULL) { kfree(sc->ether.rx_ring); sc->ether.rx_ring = NULL; - dev_err(&sc->pdev->dev, "SBE 2T3E3: no buffer space for RX ring\n"); return -ENOMEM; } |