diff options
author | Kees Cook <keescook@chromium.org> | 2015-11-19 19:17:24 -0500 |
---|---|---|
committer | Alex Williamson <alex.williamson@redhat.com> | 2015-11-20 11:00:10 -0500 |
commit | 7200be7c81cc1a1c54a79348a724c16345c5242f (patch) | |
tree | 99e614dd0c50007d870649a2430364ae3c56f7c7 /drivers/vfio | |
parent | 7d10f4e0797597a31f2724b46e619ee10d8eb501 (diff) |
vfio: platform: remove needless stack usage
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>
Diffstat (limited to 'drivers/vfio')
-rw-r--r-- | drivers/vfio/platform/vfio_platform_common.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/vfio/platform/vfio_platform_common.c b/drivers/vfio/platform/vfio_platform_common.c index a1c50d630792..418cdd9ba3f4 100644 --- a/drivers/vfio/platform/vfio_platform_common.c +++ b/drivers/vfio/platform/vfio_platform_common.c | |||
@@ -51,13 +51,10 @@ static vfio_platform_reset_fn_t vfio_platform_lookup_reset(const char *compat, | |||
51 | 51 | ||
52 | static void vfio_platform_get_reset(struct vfio_platform_device *vdev) | 52 | static void vfio_platform_get_reset(struct vfio_platform_device *vdev) |
53 | { | 53 | { |
54 | char modname[256]; | ||
55 | |||
56 | vdev->reset = vfio_platform_lookup_reset(vdev->compat, | 54 | vdev->reset = vfio_platform_lookup_reset(vdev->compat, |
57 | &vdev->reset_module); | 55 | &vdev->reset_module); |
58 | if (!vdev->reset) { | 56 | if (!vdev->reset) { |
59 | snprintf(modname, 256, "vfio-reset:%s", vdev->compat); | 57 | request_module("vfio-reset:%s", vdev->compat); |
60 | request_module(modname); | ||
61 | vdev->reset = vfio_platform_lookup_reset(vdev->compat, | 58 | vdev->reset = vfio_platform_lookup_reset(vdev->compat, |
62 | &vdev->reset_module); | 59 | &vdev->reset_module); |
63 | } | 60 | } |