fix a warning

| mckernel/kernel/../arch/x86/kernel/memory.c: In function '__set_pt_page':
| mckernel/kernel/../arch/x86/kernel/memory.c:367:
|     warning: 'init_pt_lock_flags' may be used uninitialized in this function
This commit is contained in:
NAKAMURA Gou
2014-12-22 17:03:32 +09:00
parent b1b6fab7b8
commit 55f7ee1526

View File

@ -367,6 +367,7 @@ static int __set_pt_page(struct page_table *pt, void *virt, unsigned long phys,
unsigned long init_pt_lock_flags;
int ret = -ENOMEM;
init_pt_lock_flags = 0; /* for avoidance of warning */
if (in_kernel) {
init_pt_lock_flags = ihk_mc_spinlock_lock(&init_pt_lock);
}