Browse Source

hvc_xen: avoid uninitialized variable warning

Older compilers don't recognize that "v" can't be used uninitialized;
other code using hvm_get_parameter() zeros the value too, so follow
suit here.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Jan Beulich 10 years ago
parent
commit
c4ace5daf4
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/tty/hvc/hvc_xen.c

+ 1 - 1
drivers/tty/hvc/hvc_xen.c

@@ -302,7 +302,7 @@ static int xen_initial_domain_console_init(void)
 static void xen_console_update_evtchn(struct xencons_info *info)
 static void xen_console_update_evtchn(struct xencons_info *info)
 {
 {
 	if (xen_hvm_domain()) {
 	if (xen_hvm_domain()) {
-		uint64_t v;
+		uint64_t v = 0;
 		int err;
 		int err;
 
 
 		err = hvm_get_parameter(HVM_PARAM_CONSOLE_EVTCHN, &v);
 		err = hvm_get_parameter(HVM_PARAM_CONSOLE_EVTCHN, &v);