提交 e20918f6 编写于 作者: D Dongliang Mu 提交者: Paolo Bonzini

x86: kvm: remove NULL check before kfree

kfree can handle NULL pointer as its argument.
According to coccinelle isnullfree check, remove NULL check
before kfree operation.
Signed-off-by: NDongliang Mu <mudongliangabcd@gmail.com>
Message-Id: <20220614133458.147314-1-dzm91@hust.edu.cn>
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
上级 943dfea8
......@@ -236,8 +236,7 @@ void kvm_async_pf_task_wake(u32 token)
raw_spin_unlock(&b->lock);
/* A dummy token might be allocated and ultimately not used. */
if (dummy)
kfree(dummy);
kfree(dummy);
}
EXPORT_SYMBOL_GPL(kvm_async_pf_task_wake);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册