Skip to content

Commit 76807fc

Browse files
sagigrimbergChristoph Hellwig
authored andcommitted
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 <[email protected]> Reported-by: Dan Carpenter <[email protected]> Signed-off-by: Sagi Grimberg <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
1 parent 6f99ac0 commit 76807fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/nvme/host/auth.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -953,7 +953,7 @@ int nvme_auth_init_ctrl(struct nvme_ctrl *ctrl)
953953
goto err_free_dhchap_secret;
954954

955955
if (!ctrl->opts->dhchap_secret && !ctrl->opts->dhchap_ctrl_secret)
956-
return ret;
956+
return 0;
957957

958958
ctrl->dhchap_ctxs = kvcalloc(ctrl_max_dhchaps(ctrl),
959959
sizeof(*chap), GFP_KERNEL);

0 commit comments

Comments
 (0)