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>
This commit is contained in:
parent
2fec1dfc28
commit
ee8cd008b7
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user