diff options
Diffstat (limited to 'drivers/staging/sbe-2t3e3/dc.c')
-rw-r--r-- | drivers/staging/sbe-2t3e3/dc.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/staging/sbe-2t3e3/dc.c b/drivers/staging/sbe-2t3e3/dc.c index f207b9e015ce..02510f67ac45 100644 --- a/drivers/staging/sbe-2t3e3/dc.c +++ b/drivers/staging/sbe-2t3e3/dc.c @@ -316,13 +316,13 @@ static int dc_init_descriptor_list(struct channel *sc) if (sc->ether.rx_ring == NULL) sc->ether.rx_ring = kcalloc(SBE_2T3E3_RX_DESC_RING_SIZE, - sizeof(t3e3_rx_desc_t), GFP_KERNEL); + sizeof(struct t3e3_rx_desc), GFP_KERNEL); if (sc->ether.rx_ring == NULL) return -ENOMEM; if (sc->ether.tx_ring == NULL) sc->ether.tx_ring = kcalloc(SBE_2T3E3_TX_DESC_RING_SIZE, - sizeof(t3e3_tx_desc_t), GFP_KERNEL); + sizeof(struct t3e3_tx_desc), GFP_KERNEL); if (sc->ether.tx_ring == NULL) { kfree(sc->ether.rx_ring); sc->ether.rx_ring = NULL; @@ -339,7 +339,8 @@ static int dc_init_descriptor_list(struct channel *sc) SBE_2T3E3_RX_DESC_SECOND_ADDRESS_CHAINED | SBE_2T3E3_MTU; if (sc->ether.rx_data[i] == NULL) { - if (!(m = dev_alloc_skb(MCLBYTES))) { + m = dev_alloc_skb(MCLBYTES); + if (!m) { for (j = 0; j < i; j++) { dev_kfree_skb_any(sc->ether.rx_data[j]); sc->ether.rx_data[j] = NULL; |