diff options
author | Christoph Hellwig <[email protected]> | 2022-07-18 07:00:12 +0200 |
---|---|---|
committer | Jens Axboe <[email protected]> | 2022-08-02 17:22:51 -0600 |
commit | ee8cd008b7da0ee6f24167739e364f43b8a0875b (patch) | |
tree | 24a424921544a66a6602f2099a6d90968867c7f4 | |
parent | 2fec1dfc28c993fe0ff8b72754e0b60a9338486e (diff) |
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 <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Sagi Grimberg <[email protected]>
Reviewed-by: Chaitanya Kulkarni <[email protected]>
Reviewed-by: Hannes Reinecke <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
-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); } |