diff options
author | 2025-04-11 10:00:15 +0900 | |
---|---|---|
committer | 2025-04-16 07:37:36 +0200 | |
commit | b1efcc470eb30073f3dedb9a88cffa71ea75d853 (patch) | |
tree | d545974f18733d2f6c424f1cdeae0b5604bf304c | |
parent | nvme-multipath: sysfs links may not be created for devices (diff) | |
download | wireguard-linux-b1efcc470eb30073f3dedb9a88cffa71ea75d853.tar.xz wireguard-linux-b1efcc470eb30073f3dedb9a88cffa71ea75d853.zip |
nvmet: auth: use NULL to clear a pointer in nvmet_auth_sq_free()
When compiling with C=1, the following sparse warning is generated:
auth.c:243:23: warning: Using plain integer as NULL pointer
Avoid this warning by using NULL to instead of 0 to set the sq tls_key
pointer.
Fixes: fa2e0f8bbc68 ("nvmet-tcp: support secure channel concatenation")
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>
-rw-r--r-- | drivers/nvme/target/auth.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvme/target/auth.c b/drivers/nvme/target/auth.c index 0b0645ac5df4..cef8d77f477b 100644 --- a/drivers/nvme/target/auth.c +++ b/drivers/nvme/target/auth.c @@ -240,7 +240,7 @@ void nvmet_auth_sq_free(struct nvmet_sq *sq) { cancel_delayed_work(&sq->auth_expired_work); #ifdef CONFIG_NVME_TARGET_TCP_TLS - sq->tls_key = 0; + sq->tls_key = NULL; #endif kfree(sq->dhchap_c1); sq->dhchap_c1 = NULL; |