Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7b37b064 authored by akpm@osdl.org's avatar akpm@osdl.org Committed by Dave Jones
Browse files

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



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

Signed-off-by: default avatarAmit Choudhary <amit2030@gmail.com>
Signed-off-by: default avatarDave Jones <davej@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
parent 7f02d687
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -281,10 +281,11 @@ static int __devinit agp_sgi_init(void)
	else
		return 0;

	sgi_tioca_agp_bridges =
	    (struct agp_bridge_data **)kmalloc(tioca_gart_found *
	sgi_tioca_agp_bridges = kmalloc(tioca_gart_found *
					sizeof(struct agp_bridge_data *),
					GFP_KERNEL);
	if (!sgi_tioca_agp_bridges)
		return -ENOMEM;

	j = 0;
	list_for_each_entry(info, &tioca_list, ca_list) {