Skip to content

Commit b1efcc4

Browse files
damien-lemoalChristoph Hellwig
authored andcommitted
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: fa2e0f8 ("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>
1 parent 08937bc commit b1efcc4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/nvme/target/auth.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ void nvmet_auth_sq_free(struct nvmet_sq *sq)
240240
{
241241
cancel_delayed_work(&sq->auth_expired_work);
242242
#ifdef CONFIG_NVME_TARGET_TCP_TLS
243-
sq->tls_key = 0;
243+
sq->tls_key = NULL;
244244
#endif
245245
kfree(sq->dhchap_c1);
246246
sq->dhchap_c1 = NULL;

0 commit comments

Comments
 (0)