提交 7200be7c 编写于 作者: K Kees Cook 提交者: Alex Williamson

vfio: platform: remove needless stack usage

request_module already takes format strings, so no need to duplicate
the effort.
Signed-off-by: NKees Cook <keescook@chromium.org>
Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
上级 7d10f4e0
......@@ -51,13 +51,10 @@ static vfio_platform_reset_fn_t vfio_platform_lookup_reset(const char *compat,
static void vfio_platform_get_reset(struct vfio_platform_device *vdev)
{
char modname[256];
vdev->reset = vfio_platform_lookup_reset(vdev->compat,
&vdev->reset_module);
if (!vdev->reset) {
snprintf(modname, 256, "vfio-reset:%s", vdev->compat);
request_module(modname);
request_module("vfio-reset:%s", vdev->compat);
vdev->reset = vfio_platform_lookup_reset(vdev->compat,
&vdev->reset_module);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册