diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2017-01-09 17:05:21 +0000 |
---|---|---|
committer | Michael Tokarev <mjt@tls.msk.ru> | 2017-01-24 23:26:53 +0300 |
commit | a1f910875668d87e139e79fce38e9c2e1c3747dd (patch) | |
tree | 6421b9190e9606de06aadcf94ca50292b9e5a8d3 /hw | |
parent | 9d7b2670a334f9256f926da133e36a8a2f2299bd (diff) |
hw/i386/kvmvapic: Remove dead code in patch_hypercalls()
The patch_hypercalls() function sets up a 'patches'
variable and checks it at the end of the function, but
never modifies it in the middle. Remove this dead code,
which seems to have been present since the function was
added in commit e5ad936b0fd7 in 2012.
(Spotted by Coverity: CID 1005581.)
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Acked-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/i386/kvmvapic.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/hw/i386/kvmvapic.c b/hw/i386/kvmvapic.c index 2f767b620e..702e281dc8 100644 --- a/hw/i386/kvmvapic.c +++ b/hw/i386/kvmvapic.c @@ -535,7 +535,6 @@ static int patch_hypercalls(VAPICROMState *s) uint8_t alternates[2]; const uint8_t *pattern; const uint8_t *patch; - int patches = 0; off_t pos; uint8_t *rom; @@ -566,11 +565,6 @@ static int patch_hypercalls(VAPICROMState *s) } g_free(rom); - - if (patches != 0 && patches != 2) { - return -1; - } - return 0; } |