|
@@ -1430,6 +1430,10 @@ static int mlx4_ib_alloc_pv_bufs(struct mlx4_ib_demux_pv_ctx *ctx,
|
|
|
tun_qp->ring[i].addr,
|
|
|
rx_buf_size,
|
|
|
DMA_FROM_DEVICE);
|
|
|
+ if (ib_dma_mapping_error(ctx->ib_dev, tun_qp->ring[i].map)) {
|
|
|
+ kfree(tun_qp->ring[i].addr);
|
|
|
+ goto err;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
for (i = 0; i < MLX4_NUM_TUNNEL_BUFS; i++) {
|
|
@@ -1442,6 +1446,11 @@ static int mlx4_ib_alloc_pv_bufs(struct mlx4_ib_demux_pv_ctx *ctx,
|
|
|
tun_qp->tx_ring[i].buf.addr,
|
|
|
tx_buf_size,
|
|
|
DMA_TO_DEVICE);
|
|
|
+ if (ib_dma_mapping_error(ctx->ib_dev,
|
|
|
+ tun_qp->tx_ring[i].buf.map)) {
|
|
|
+ kfree(tun_qp->tx_ring[i].buf.addr);
|
|
|
+ goto tx_err;
|
|
|
+ }
|
|
|
tun_qp->tx_ring[i].ah = NULL;
|
|
|
}
|
|
|
spin_lock_init(&tun_qp->tx_lock);
|