diff options
author | Sagi Grimberg <sagi@grimberg.me> | 2022-12-25 12:28:51 +0100 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2022-12-28 17:26:35 +0100 |
commit | 76807fcd73b818eb9f245ef1035aed34ecdd9813 (patch) | |
tree | ab215282cc41ee3edaf820f95620192927c7d69c /drivers/nvme/host/auth.c | |
parent | nvme: consult the CSE log page for unprivileged passthrough (diff) | |
download | linux-76807fcd73b818eb9f245ef1035aed34ecdd9813.tar.xz linux-76807fcd73b818eb9f245ef1035aed34ecdd9813.zip |
nvme-auth: fix smatch warning complaints
When initializing auth context, there may be no secrets passed
by the user. Make return code explicit when returning successfully.
smatch warnings:
drivers/nvme/host/auth.c:950 nvme_auth_init_ctrl() warn: missing error code? 'ret'
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to '')
-rw-r--r-- | drivers/nvme/host/auth.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvme/host/auth.c b/drivers/nvme/host/auth.c index bb0abbe4491c..4424f53a8a0a 100644 --- a/drivers/nvme/host/auth.c +++ b/drivers/nvme/host/auth.c @@ -953,7 +953,7 @@ int nvme_auth_init_ctrl(struct nvme_ctrl *ctrl) goto err_free_dhchap_secret; if (!ctrl->opts->dhchap_secret && !ctrl->opts->dhchap_ctrl_secret) - return ret; + return 0; ctrl->dhchap_ctxs = kvcalloc(ctrl_max_dhchaps(ctrl), sizeof(*chap), GFP_KERNEL); |