aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/ulp
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/infiniband/ulp')
-rw-r--r--drivers/infiniband/ulp/iser/iser_initiator.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/infiniband/ulp/iser/iser_initiator.c b/drivers/infiniband/ulp/iser/iser_initiator.c
index 538822684d5b..334f34b1cd46 100644
--- a/drivers/infiniband/ulp/iser/iser_initiator.c
+++ b/drivers/infiniband/ulp/iser/iser_initiator.c
@@ -610,11 +610,12 @@ void iser_snd_completion(struct iser_tx_desc *tx_desc,
610 ib_dma_unmap_single(device->ib_device, tx_desc->dma_addr, 610 ib_dma_unmap_single(device->ib_device, tx_desc->dma_addr,
611 ISER_HEADERS_LEN, DMA_TO_DEVICE); 611 ISER_HEADERS_LEN, DMA_TO_DEVICE);
612 kmem_cache_free(ig.desc_cache, tx_desc); 612 kmem_cache_free(ig.desc_cache, tx_desc);
613 tx_desc = NULL;
613 } 614 }
614 615
615 atomic_dec(&ib_conn->post_send_buf_count); 616 atomic_dec(&ib_conn->post_send_buf_count);
616 617
617 if (tx_desc->type == ISCSI_TX_CONTROL) { 618 if (tx_desc && tx_desc->type == ISCSI_TX_CONTROL) {
618 /* this arithmetic is legal by libiscsi dd_data allocation */ 619 /* this arithmetic is legal by libiscsi dd_data allocation */
619 task = (void *) ((long)(void *)tx_desc - 620 task = (void *) ((long)(void *)tx_desc -
620 sizeof(struct iscsi_task)); 621 sizeof(struct iscsi_task));