nvme-pci: set nvmeq->cq_vector after alloc cq/sq
authorJianchao Wang <jianchao.w.wang@oracle.com>
Thu, 24 May 2018 09:51:33 +0000 (17:51 +0800)
committerChristoph Hellwig <hch@lst.de>
Fri, 25 May 2018 14:50:12 +0000 (16:50 +0200)
commita8e3e0bb749c0893a2cfd24652a77f45eea338d3
tree2d7ae163c52f416a35cbfd7d15347a81418eb148
parente9a9853c23c13a37546397b61b270999fd0fb759
nvme-pci: set nvmeq->cq_vector after alloc cq/sq

Set cq_vector after alloc cq/sq, otherwise nvme_suspend_queue will invoke
free_irq for it and cause a 'Trying to free already-free IRQ  xxx'
warning if the create CQ/SQ command times out.

Signed-off-by: Jianchao Wang <jianchao.w.wang@oracle.com>
Reviewed-by: Keith Busch <keith.busch@intel.com>
[hch: fixed to pass a s16 and clean up the comment]
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/pci.c