* [PATCH 2.6.20-rc2] drivers/char/agp/sgi-agp.c: check kmalloc() return value.
@ 2006-12-31 22:14 Amit Choudhary
0 siblings, 0 replies; only message in thread
From: Amit Choudhary @ 2006-12-31 22:14 UTC (permalink / raw)
To: Linux Kernel
Description: Check the return value of kmalloc() in function agp_sgi_init(), in file drivers/char/agp/sgi-agp.c.
Signed-off-by: Amit Choudhary <amit2030@gmail.com>
diff --git a/drivers/char/agp/sgi-agp.c b/drivers/char/agp/sgi-agp.c
index d73be4c..5897e6c 100644
--- a/drivers/char/agp/sgi-agp.c
+++ b/drivers/char/agp/sgi-agp.c
@@ -285,6 +285,8 @@ static int __devinit agp_sgi_init(void)
(struct agp_bridge_data **)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) {
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2006-12-31 22:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-31 22:14 [PATCH 2.6.20-rc2] drivers/char/agp/sgi-agp.c: check kmalloc() return value Amit Choudhary
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox