diff --git a/iscsi-scst/kernel/isert-scst/iser_rdma.c b/iscsi-scst/kernel/isert-scst/iser_rdma.c index 2fc6d0a5f..72e169fd4 100644 --- a/iscsi-scst/kernel/isert-scst/iser_rdma.c +++ b/iscsi-scst/kernel/isert-scst/iser_rdma.c @@ -1141,7 +1141,10 @@ out: static void isert_device_release(struct isert_device *isert_dev) { - int err, i; +#ifndef IB_PD_HAS_LOCAL_DMA_LKEY + int err; +#endif + int i; TRACE_ENTRY(); @@ -1162,10 +1165,7 @@ static void isert_device_release(struct isert_device *isert_dev) cancel_work_sync(&cq_desc->cq_comp_work); #endif - err = ib_destroy_cq(cq_desc->cq); - if (unlikely(err)) - PRINT_ERROR("Failed to destroy cq, err:%d", err); - + ib_destroy_cq(cq_desc->cq); destroy_workqueue(cq_desc->cq_workqueue); }