lkml.org 
[lkml]   [2007]   [May]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] ALPHA: TITAN - check for allocated memory
On Wed, May 16, 2007 at 10:13:32PM +0400, Cyrill Gorcunov wrote:
> This patch adds checking for allocated memory
> which is used to hold AGP info. Also some whitespace
> cleanup.

Could you please not do that again? Whitespace cleanup is nice as a separate
followup, but as it is it just obscures the real changes in patch. Digging
out

> @@ -767,6 +767,11 @@ titan_agp_info(void)
> * Allocate the info structure.
> */
> agp = kmalloc(sizeof(*agp), GFP_KERNEL);
> + if (agp == NULL) {
> + printk(KERN_ERR "TITAN - cannot allocate struct of size %d bytes\n",
> + sizeof(*agp));
> + return NULL;
> + }

out of hundreds of lines in patch just makes review harder. Incidentally,
%d is not size_t, it's int. Use %zu, please.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-05-16 21:43    [W:0.022 / U:0.600 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site