diff options
author | Colin Ian King <colin.king@canonical.com> | 2021-07-06 17:56:50 +0300 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2021-08-16 15:42:23 +0300 |
commit | ad0e9a80ba0f20db0f86e23d1ad2979513a9a8ee (patch) | |
tree | 3162d83acaf89caf263954c37e3b83acebfc1004 /drivers/nvme/target/zns.c | |
parent | 8d84f9de69ca23f2637dc19d96f39228c8426e97 (diff) | |
download | linux-ad0e9a80ba0f20db0f86e23d1ad2979513a9a8ee.tar.xz |
nvmet: remove redundant assignments of variable status
There are two occurrances where variable status is being assigned a
value that is never read and it is being re-assigned a new value
almost immediately afterwards on an error exit path. The assignments
are redundant and can be removed.
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/nvme/target/zns.c')
-rw-r--r-- | drivers/nvme/target/zns.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/nvme/target/zns.c b/drivers/nvme/target/zns.c index 17f8b7a45f21..46bc30fe85d2 100644 --- a/drivers/nvme/target/zns.c +++ b/drivers/nvme/target/zns.c @@ -115,14 +115,11 @@ void nvmet_execute_identify_cns_cs_ns(struct nvmet_req *req) } status = nvmet_req_find_ns(req); - if (status) { - status = NVME_SC_INTERNAL; + if (status) goto done; - } if (!bdev_is_zoned(req->ns->bdev)) { req->error_loc = offsetof(struct nvme_identify, nsid); - status = NVME_SC_INVALID_NS | NVME_SC_DNR; goto done; } |