浏览代码

KVM: x86 emulator: check return value against correct define

Check return value against correct define instead of open code
the value.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Gleb Natapov 15 年之前
父节点
当前提交
af5b4f7ff7
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      arch/x86/kvm/emulate.c

+ 1 - 1
arch/x86/kvm/emulate.c

@@ -566,7 +566,7 @@ static u32 group2_table[] = {
 #define insn_fetch(_type, _size, _eip)                                  \
 #define insn_fetch(_type, _size, _eip)                                  \
 ({	unsigned long _x;						\
 ({	unsigned long _x;						\
 	rc = do_insn_fetch(ctxt, ops, (_eip), &_x, (_size));		\
 	rc = do_insn_fetch(ctxt, ops, (_eip), &_x, (_size));		\
-	if (rc != 0)							\
+	if (rc != X86EMUL_CONTINUE)					\
 		goto done;						\
 		goto done;						\
 	(_eip) += (_size);						\
 	(_eip) += (_size);						\
 	(_type)_x;							\
 	(_type)_x;							\