Skip to content

Commit

Permalink
vfio: platform: remove needless stack usage
Browse files Browse the repository at this point in the history
request_module already takes format strings, so no need to duplicate
the effort.

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
  • Loading branch information
Kees Cook authored and Alex Williamson committed Nov 20, 2015
1 parent 7d10f4e commit 7200be7
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/vfio/platform/vfio_platform_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 7200be7

Please sign in to comment.