mirror of
https://github.com/torvalds/linux.git
synced 2026-06-02 19:43:40 +02:00
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: Alok Tiwari <alok.a.tiwari@oracle.com> Reviewed-by: Randy Dunlap <rdunlap@infradead.org> Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
parent
3b1eabed27
commit
2e7dd5c1a8
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user