Commit ee8cd008 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jens Axboe

nvmet: don't check for NULL pointer before kfree in nvmet_host_release

And add an empty line after the variable declaration.
Reported-by: default avatarkernel test robot <lkp@intel.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarSagi Grimberg <sagi@grimberg.me>
Reviewed-by: default avatarChaitanya Kulkarni <kch@nvidia.com>
Reviewed-by: default avatarHannes Reinecke <hare@suse.de>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 2fec1dfc
...@@ -1808,9 +1808,9 @@ static struct configfs_attribute *nvmet_host_attrs[] = { ...@@ -1808,9 +1808,9 @@ static struct configfs_attribute *nvmet_host_attrs[] = {
static void nvmet_host_release(struct config_item *item) static void nvmet_host_release(struct config_item *item)
{ {
struct nvmet_host *host = to_host(item); struct nvmet_host *host = to_host(item);
#ifdef CONFIG_NVME_TARGET_AUTH #ifdef CONFIG_NVME_TARGET_AUTH
if (host->dhchap_secret) kfree(host->dhchap_secret);
kfree(host->dhchap_secret);
#endif #endif
kfree(host); kfree(host);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment