From: Irvin Cote Date: Wed, 17 May 2023 22:09:15 +0000 (-0300) Subject: nvme-core: remove redundant check from nvme_init_ns_head X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=2110a6bcd7afd313ae10e9808878cd7c419c6b65;p=linux.git nvme-core: remove redundant check from nvme_init_ns_head nvme_find_ns_head already checks that the list of namescpaces in an already existing namespace head is not empty Signed-off-by: Irvin Cote Reviewed-by: Sagi Grimberg Reviewed-by: Christoph Hellwig Signed-off-by: Keith Busch --- diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index 43b906a59c8c5..3263af1c2c15f 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -3563,7 +3563,7 @@ static int nvme_init_ns_head(struct nvme_ns *ns, struct nvme_ns_info *info) goto out_put_ns_head; } - if (!multipath && !list_empty(&head->list)) { + if (!multipath) { dev_warn(ctrl->device, "Found shared namespace %d, but multipathing not supported.\n", info->nsid);