diff options
author | Christoph Hellwig <hch@lst.de> | 2022-07-18 08:00:12 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-08-03 02:22:51 +0300 |
commit | ee8cd008b7da0ee6f24167739e364f43b8a0875b (patch) | |
tree | 24a424921544a66a6602f2099a6d90968867c7f4 /drivers/nvme/target | |
parent | 2fec1dfc28c993fe0ff8b72754e0b60a9338486e (diff) | |
download | linux-ee8cd008b7da0ee6f24167739e364f43b8a0875b.tar.xz |
nvmet: don't check for NULL pointer before kfree in nvmet_host_release
And add an empty line after the variable declaration.
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/nvme/target')
-rw-r--r-- | drivers/nvme/target/configfs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/nvme/target/configfs.c b/drivers/nvme/target/configfs.c index e826a22f5e07..2bcd60758919 100644 --- a/drivers/nvme/target/configfs.c +++ b/drivers/nvme/target/configfs.c @@ -1808,9 +1808,9 @@ static struct configfs_attribute *nvmet_host_attrs[] = { static void nvmet_host_release(struct config_item *item) { struct nvmet_host *host = to_host(item); + #ifdef CONFIG_NVME_TARGET_AUTH - if (host->dhchap_secret) - kfree(host->dhchap_secret); + kfree(host->dhchap_secret); #endif kfree(host); } |