nvme: free sq/cq dbbuf pointers when dbbuf set fails
authorMinwoo Im <minwoo.im.dev@gmail.com>
Thu, 5 Nov 2020 14:28:47 +0000 (23:28 +0900)
committerChristoph Hellwig <hch@lst.de>
Sat, 14 Nov 2020 08:57:55 +0000 (09:57 +0100)
commit0f0d2c876c96d4908a9ef40959a44bec21bdd6cf
treeed1c26558b7c6bfba30767390465be4f89a1ac8a
parent9f16a66733c90b5f33f624b0b0e36a345b0aaf93
nvme: free sq/cq dbbuf pointers when dbbuf set fails

If Doorbell Buffer Config command fails even 'dev->dbbuf_dbs != NULL'
which means OACS indicates that NVME_CTRL_OACS_DBBUF_SUPP is set,
nvme_dbbuf_update_and_check_event() will check event even it's not been
successfully set.

This patch fixes mismatch among dbbuf for sq/cqs in case that dbbuf
command fails.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/pci.c