Skip to content
/ linux Public
forked from torvalds/linux

Commit 51d24f7

Browse files
error27Christoph Hellwig
authored and
Christoph Hellwig
committed
nvme-auth: fix an error code in nvme_auth_process_dhchap_challenge()
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]>
1 parent 0dd6fff commit 51d24f7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/nvme/host/auth.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ static int nvme_auth_process_dhchap_challenge(struct nvme_ctrl *ctrl,
254254
chap->qid, ret, gid_name);
255255
chap->status = NVME_AUTH_DHCHAP_FAILURE_DHGROUP_UNUSABLE;
256256
chap->dh_tfm = NULL;
257-
return -ret;
257+
return ret;
258258
}
259259
dev_dbg(ctrl->device, "qid %d: selected DH group %s\n",
260260
chap->qid, gid_name);

0 commit comments

Comments
 (0)