diff --git a/drivers/infiniband/sw/rdmavt/cq.c b/drivers/infiniband/sw/rdmavt/cq.c index 4d0b6992e847d960c0f34f8cd6726c588214e69f..7aa7a4e312f151d617e4cd5ca0402f913e4918ef 100644 --- a/drivers/infiniband/sw/rdmavt/cq.c +++ b/drivers/infiniband/sw/rdmavt/cq.c @@ -532,7 +532,8 @@ void rvt_cq_exit(struct rvt_dev_info *rdi) /* block future queuing from send_complete() */ spin_lock_irq(&rdi->n_cqs_lock); - if (!rdi->worker) { + worker = rdi->worker; + if (!worker) { spin_unlock_irq(&rdi->n_cqs_lock); return; }