Commit 2e7dd5c1 authored by Alok Tiwari's avatar Alok Tiwari Committed by Christoph Hellwig
Browse files

nvmet: remove redundant assignment of error code in nvmet_ns_enable()



Remove 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: default avatarAlok Tiwari <alok.a.tiwari@oracle.com>
Reviewed-by: default avatarRandy Dunlap <rdunlap@infradead.org>
Reviewed-by: default avatarChaitanya Kulkarni <kch@nvidia.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent 3b1eabed
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -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);