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'
Unified · Split
| @@ -953,7 +953,7 @@ int nvme_auth_init_ctrl(struct nvme_ctrl *ctrl) · 952 unmodified lines | ||
| 953 | 953 | goto err_free_dhchap_secret; |
| 954 | 954 | |
| 955 | 955 | if (!ctrl->opts->dhchap_secret && !ctrl->opts->dhchap_ctrl_secret) |
| 956 | − return ret; | |
| 956 | + return 0; | |
| 957 | 957 | |
| 958 | 958 | ctrl->dhchap_ctxs = kvcalloc(ctrl_max_dhchaps(ctrl), |
| 959 | 959 | sizeof(*chap), GFP_KERNEL); |