[PATCH v2 3/5] nvmet: Remove redundant assignment of error code in nvmet_ns_enable()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



removing the unnecessary ret = -EMFILE; assignment since it is
immediately overwritten by the result of nvmet_bdev_ns_enable()
The initial value(-EMFILE) is redundant because it has no effect
on the code logic or outcome.

Signed-off-by: Alok Tiwari <alok.a.tiwari@xxxxxxxxxx>
Reviewed-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
---
v2
no changes only added Reviewed-by
---
 drivers/nvme/target/core.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/nvme/target/core.c b/drivers/nvme/target/core.c
index 175c5b6d4dd58..884286f90688a 100644
--- a/drivers/nvme/target/core.c
+++ b/drivers/nvme/target/core.c
@@ -581,8 +581,6 @@ int nvmet_ns_enable(struct nvmet_ns *ns)
 	if (ns->enabled)
 		goto out_unlock;
 
-	ret = -EMFILE;
-
 	ret = nvmet_bdev_ns_enable(ns);
 	if (ret == -ENOTBLK)
 		ret = nvmet_file_ns_enable(ns);
-- 
2.46.0





[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux