Skip to contentSkip to conversation

nvmet: remove unreachable code

PATCH New Chaitanya Kulkarni 2 participants 2 messages Aug 23, 2018 – Oct 9, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nvmet: remove unreachable code

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 at wdc.com>
---
 drivers/nvme/target/discovery.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/nvme/target/discovery.c +1 -3
index eae29f493a07..d1954f4ca28d 100644
@@ -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)
Signature · 1 line
2.17.0
#1 lore raw

PATCH 1/1 nvmet: remove unreachable code

Quoted 4 lines · Chaitanya Kulkarni

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 at wdc.com>

Thanks,

applied to nvme-4.20.