Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7b37b064c294af350c462f77d7a9a44485a93684 Commit: 7b37b064c294af350c462f77d7a9a44485a93684 Parent: 7f02d687b44aba0cfc393102ea1ccc78eadf8a04 Author: [EMAIL PROTECTED] <[EMAIL PROTECTED]> AuthorDate: Tue Jan 2 14:44:31 2007 -0800 Committer: Dave Jones <[EMAIL PROTECTED]> CommitDate: Tue Jan 2 23:37:31 2007 -0500
[AGPGART] drivers/char/agp/sgi-agp.c: check kmalloc() return value 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 | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/char/agp/sgi-agp.c b/drivers/char/agp/sgi-agp.c index d73be4c..902648d 100644 --- 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) { - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html