* [PATCH] nvme-auth: fix smatch warning complaints
@ 2022-12-25 11:28 Sagi Grimberg
2022-12-27 17:53 ` Dan Carpenter
2022-12-28 15:37 ` Christoph Hellwig
0 siblings, 2 replies; 3+ messages in thread
From: Sagi Grimberg @ 2022-12-25 11:28 UTC (permalink / raw)
To: linux-nvme; +Cc: Christoph Hellwig, Keith Busch, Hannes Reinecke, Dan Carpenter
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>
---
drivers/nvme/host/auth.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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);
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] nvme-auth: fix smatch warning complaints
2022-12-25 11:28 [PATCH] nvme-auth: fix smatch warning complaints Sagi Grimberg
@ 2022-12-27 17:53 ` Dan Carpenter
2022-12-28 15:37 ` Christoph Hellwig
1 sibling, 0 replies; 3+ messages in thread
From: Dan Carpenter @ 2022-12-27 17:53 UTC (permalink / raw)
To: Sagi Grimberg; +Cc: linux-nvme, Christoph Hellwig, Keith Busch, Hannes Reinecke
On Sun, Dec 25, 2022 at 01:28:51PM +0200, Sagi Grimberg wrote:
> 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>
Awesome. Thanks!
regards,
dan carpenter
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] nvme-auth: fix smatch warning complaints
2022-12-25 11:28 [PATCH] nvme-auth: fix smatch warning complaints Sagi Grimberg
2022-12-27 17:53 ` Dan Carpenter
@ 2022-12-28 15:37 ` Christoph Hellwig
1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2022-12-28 15:37 UTC (permalink / raw)
To: Sagi Grimberg
Cc: linux-nvme, Christoph Hellwig, Keith Busch, Hannes Reinecke,
Dan Carpenter
Thanks, applied to nvme-6.2.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-12-28 15:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-25 11:28 [PATCH] nvme-auth: fix smatch warning complaints Sagi Grimberg
2022-12-27 17:53 ` Dan Carpenter
2022-12-28 15:37 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox