|
@@ -1346,6 +1346,8 @@ static int bcm_sysport_init_tx_ring(struct bcm_sysport_priv *priv,
|
|
|
|
|
|
ring->cbs = kcalloc(size, sizeof(struct bcm_sysport_cb), GFP_KERNEL);
|
|
ring->cbs = kcalloc(size, sizeof(struct bcm_sysport_cb), GFP_KERNEL);
|
|
if (!ring->cbs) {
|
|
if (!ring->cbs) {
|
|
|
|
+ dma_free_coherent(kdev, sizeof(struct dma_desc),
|
|
|
|
+ ring->desc_cpu, ring->desc_dma);
|
|
netif_err(priv, hw, priv->netdev, "CB allocation failed\n");
|
|
netif_err(priv, hw, priv->netdev, "CB allocation failed\n");
|
|
return -ENOMEM;
|
|
return -ENOMEM;
|
|
}
|
|
}
|