|
@@ -1015,7 +1015,7 @@ static struct ib_ucq_object *create_cq(struct ib_uverbs_file *file,
|
|
cq->uobject = &obj->uobject;
|
|
cq->uobject = &obj->uobject;
|
|
cq->comp_handler = ib_uverbs_comp_handler;
|
|
cq->comp_handler = ib_uverbs_comp_handler;
|
|
cq->event_handler = ib_uverbs_cq_event_handler;
|
|
cq->event_handler = ib_uverbs_cq_event_handler;
|
|
- cq->cq_context = &ev_file->ev_queue;
|
|
|
|
|
|
+ cq->cq_context = ev_file ? &ev_file->ev_queue : NULL;
|
|
atomic_set(&cq->usecnt, 0);
|
|
atomic_set(&cq->usecnt, 0);
|
|
|
|
|
|
obj->uobject.object = cq;
|
|
obj->uobject.object = cq;
|