nvmet: remove unreachable code
authorChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Thu, 23 Aug 2018 02:58:45 +0000 (19:58 -0700)
committerChristoph Hellwig <hch@lst.de>
Wed, 17 Oct 2018 06:58:23 +0000 (08:58 +0200)
Get rid of the unreachable code in the nvmet_parse_discovery_cmd().
Keep the error message identical to the admin-cmd.c and io-cmd*.c

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/target/discovery.c

index eae29f493a0748d5d4daf5e2941a9be485e57f9c..d1954f4ca28d499d4009ca54adc47196f60b01cb 100644 (file)
@@ -219,12 +219,10 @@ u16 nvmet_parse_discovery_cmd(struct nvmet_req *req)
                        return NVME_SC_INVALID_OPCODE | NVME_SC_DNR;
                }
        default:
-               pr_err("unsupported cmd %d\n", cmd->common.opcode);
+               pr_err("unhandled cmd %d\n", cmd->common.opcode);
                return NVME_SC_INVALID_OPCODE | NVME_SC_DNR;
        }
 
-       pr_err("unhandled cmd %d\n", cmd->common.opcode);
-       return NVME_SC_INVALID_OPCODE | NVME_SC_DNR;
 }
 
 int __init nvmet_init_discovery(void)