提交 7b37b064 编写于 作者: A akpm@osdl.org 提交者: Dave Jones

[AGPGART] drivers/char/agp/sgi-agp.c: check kmalloc() return value

drivers/char/agp/sgi-agp.c: check kmalloc() return value
Signed-off-by: NAmit Choudhary <amit2030@gmail.com>
Signed-off-by: NDave Jones <davej@redhat.com>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
上级 7f02d687
...@@ -281,10 +281,11 @@ static int __devinit agp_sgi_init(void) ...@@ -281,10 +281,11 @@ static int __devinit agp_sgi_init(void)
else else
return 0; return 0;
sgi_tioca_agp_bridges = sgi_tioca_agp_bridges = kmalloc(tioca_gart_found *
(struct agp_bridge_data **)kmalloc(tioca_gart_found * sizeof(struct agp_bridge_data *),
sizeof(struct agp_bridge_data *), GFP_KERNEL);
GFP_KERNEL); if (!sgi_tioca_agp_bridges)
return -ENOMEM;
j = 0; j = 0;
list_for_each_entry(info, &tioca_list, ca_list) { list_for_each_entry(info, &tioca_list, ca_list) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册