Skip to content

Commit

Permalink
[AGPGART] drivers/char/agp/sgi-agp.c: check kmalloc() return value
Browse files Browse the repository at this point in the history
drivers/char/agp/sgi-agp.c: check kmalloc() return value

Signed-off-by: Amit Choudhary <amit2030@gmail.com>
Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
  • Loading branch information
akpm@osdl.org authored and Dave Jones committed Jan 3, 2007
1 parent 7f02d68 commit 7b37b06
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions drivers/char/agp/sgi-agp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 *
sizeof(struct agp_bridge_data *),
GFP_KERNEL);
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) {
Expand Down

0 comments on commit 7b37b06

Please sign in to comment.