Skip to content

Commit

Permalink
nvme-auth: fix an error code in nvme_auth_process_dhchap_challenge()
Browse files Browse the repository at this point in the history
This function was transitioned from returning NVMe status codes to
returning traditional kernel error codes.  However, this particular
return now accidentally returns positive error codes like ENOMEM instead
of negative -ENOMEM.

Fixes: b0ef1b1 ("nvme-auth: don't use NVMe status codes")
Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
  • Loading branch information
error27 authored and Christoph Hellwig committed Feb 28, 2023
1 parent 0dd6fff commit 51d24f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/nvme/host/auth.c
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ static int nvme_auth_process_dhchap_challenge(struct nvme_ctrl *ctrl,
chap->qid, ret, gid_name);
chap->status = NVME_AUTH_DHCHAP_FAILURE_DHGROUP_UNUSABLE;
chap->dh_tfm = NULL;
return -ret;
return ret;
}
dev_dbg(ctrl->device, "qid %d: selected DH group %s\n",
chap->qid, gid_name);
Expand Down

0 comments on commit 51d24f7

Please sign in to comment.