x86/mm: Fix possible increment of uninitialised variable
authorAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 9 Sep 2013 17:43:40 +0000 (18:43 +0100)
committerTim Deegan <tim@xen.org>
Tue, 10 Sep 2013 14:46:35 +0000 (15:46 +0100)
commitac2f555e37f589fde27c68a306aaac14a424040b
tree67a632e5cfc3dc8743fbe0dacbfe4c6af3d69881
parentf3a4eb9253826d1e49e682314c8666b28fa0b717
x86/mm: Fix possible increment of uninitialised variable

Discovered by Coverity, CID 1056101

When taking the continue branch on the first iteration of the loop,
gfn would indeed be uninitialised when incremented.  However, as gfn
is unconditionally constructed from i{1..4} before use in the loop
body, having it incremented in the loop header is useless.

Therefore, simply remove it.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Tim Deegan <tim@xen.org>
xen/arch/x86/mm/p2m-pt.c