aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/nvme
diff options
context:
space:
mode:
authorIsrael Rukshin <israelr@mellanox.com>2020-03-10 16:39:10 +0200
committerKeith Busch <kbusch@kernel.org>2020-03-26 04:51:55 +0900
commite7c43feae2ab8744c3112b5a714959c8ea71ca19 (patch)
tree15d3de4848e5e3993eb8a45724c9e3b8a4e3f52b /drivers/nvme
parentnvme: release ida resources (diff)
downloadwireguard-linux-e7c43feae2ab8744c3112b5a714959c8ea71ca19.tar.xz
wireguard-linux-e7c43feae2ab8744c3112b5a714959c8ea71ca19.zip
nvme: Use nvme_state_terminal helper
Improve code readability. Reviewed-by: Max Gurtovoy <maxg@mellanox.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Israel Rukshin <israelr@mellanox.com> Signed-off-by: Keith Busch <kbusch@kernel.org>
Diffstat (limited to 'drivers/nvme')
-rw-r--r--drivers/nvme/host/core.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index ad0847b6c769..392af3cf0bf9 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -2633,8 +2633,7 @@ static bool nvme_validate_cntlid(struct nvme_subsystem *subsys,
lockdep_assert_held(&nvme_subsystems_lock);
list_for_each_entry(tmp, &subsys->ctrls, subsys_entry) {
- if (tmp->state == NVME_CTRL_DELETING ||
- tmp->state == NVME_CTRL_DEAD)
+ if (nvme_state_terminal(tmp))
continue;
if (tmp->cntlid == ctrl->cntlid) {