提交 4daa2a80 编写于 作者: P Pallipadi, Venkatesh 提交者: H. Peter Anvin

x86, pat: In rbt_memtype_check_insert(), update new->type only if valid

new->type should only change when there is a valid ret_type. Otherwise
the requested type and return type should be same.
Signed-off-by: NVenkatesh Pallipadi <venkatesh.pallipadi@intel.com>
LKML-Reference: <20100224214355.GA16431@linux-os.sc.intel.com>
Tested-by: NJack Steiner <steiner@sgi.com>
Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
上级 9e41a49a
......@@ -223,7 +223,9 @@ int rbt_memtype_check_insert(struct memtype *new, unsigned long *ret_type)
new->type, ret_type);
if (!err) {
new->type = *ret_type;
if (ret_type)
new->type = *ret_type;
memtype_rb_insert(&memtype_rbroot, new);
}
return err;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册