[PATCH V2 7/8] nvme-core: remove unneacessary else
Chaitanya Kulkarni
kch at nvidia.com
Sun Mar 26 23:04:17 PDT 2023
There is no need for the else when direct return is used at the
end of the function.
Signed-off-by: Chaitanya Kulkarni <kch at nvidia.com>
Reviewed-by: Sagi Grimberg <sagi at grimberg.me>
---
drivers/nvme/host/core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index bc1091953562..fda851e8b7c6 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -3418,8 +3418,8 @@ static inline struct nvme_ns_head *dev_to_ns_head(struct device *dev)
if (disk->fops == &nvme_bdev_ops)
return nvme_get_ns_from_dev(dev)->head;
- else
- return disk->private_data;
+
+ return disk->private_data;
}
static ssize_t wwid_show(struct device *dev, struct device_attribute *attr,
--
2.29.0
More information about the Linux-nvme
mailing list