]> git.baikalelectronics.ru Git - kernel.git/commitdiff
nvmet: remove redundant assignments of variable status
authorColin Ian King <colin.king@canonical.com>
Tue, 6 Jul 2021 14:56:50 +0000 (15:56 +0100)
committerChristoph Hellwig <hch@lst.de>
Mon, 16 Aug 2021 12:42:23 +0000 (14:42 +0200)
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>
drivers/nvme/target/zns.c

index 17f8b7a45f2189c70c1fc15c7484c4480d6eed83..46bc30fe85d2b0a9ed000f5b626c676d2b60e6bf 100644 (file)
@@ -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;
        }