Skip to content

Commit

Permalink
nvme/core: fix mpsmin check
Browse files Browse the repository at this point in the history
Not sure what I was smoking.

Signed-off-by: Klaus Jensen <[email protected]>
  • Loading branch information
birkelund committed Aug 18, 2023
1 parent 413ea5e commit e2d72bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/nvme/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ int nvme_init(struct nvme_ctrl *ctrl, const char *bdf, const struct nvme_ctrl_op
cap = le64_to_cpu(mmio_read64(ctrl->regs + NVME_REG_CAP));
mpsmin = NVME_FIELD_GET(cap, CAP_MPSMIN);

if (((12u + mpsmin) >> 12) > __VFN_PAGESIZE) {
if (12u + mpsmin > __VFN_PAGESIZE) {
log_debug("controller minimum page size too large\n");
errno = EINVAL;
return -1;
Expand Down

0 comments on commit e2d72bc

Please sign in to comment.