提交 ee8cd008 编写于 作者: C Christoph Hellwig 提交者: 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: Nkernel test robot <lkp@intel.com>
Signed-off-by: NChristoph Hellwig <hch@lst.de>
Reviewed-by: NSagi Grimberg <sagi@grimberg.me>
Reviewed-by: NChaitanya Kulkarni <kch@nvidia.com>
Reviewed-by: NHannes Reinecke <hare@suse.de>
Signed-off-by: NJens Axboe <axboe@kernel.dk>
上级 2fec1dfc
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册