projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7f02d68
)
[AGPGART] drivers/char/agp/sgi-agp.c: check kmalloc() return value
author
[email protected]
<
[email protected]
>
Tue, 2 Jan 2007 22:44:31 +0000
(14:44 -0800)
committer
Dave Jones
<
[email protected]
>
Wed, 3 Jan 2007 04:37:31 +0000
(23:37 -0500)
drivers/char/agp/sgi-agp.c: check kmalloc() return value
Signed-off-by: Amit Choudhary <
[email protected]
>
Signed-off-by: Dave Jones <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
drivers/char/agp/sgi-agp.c
patch
|
blob
|
history
diff --git
a/drivers/char/agp/sgi-agp.c
b/drivers/char/agp/sgi-agp.c
index d73be4c2db8a9c5c6fffe250d36e2e3593ac53f5..902648db7efaddb4a526eab1e56b70633bba8d9a 100644
(file)
--- a/
drivers/char/agp/sgi-agp.c
+++ b/
drivers/char/agp/sgi-agp.c
@@
-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) {