public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@ftp.linux.org.uk>
To: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: Richard Henderson <rth@twiddle.net>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel-list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] ALPHA: TITAN - check for allocated memory
Date: Wed, 16 May 2007 20:41:01 +0100	[thread overview]
Message-ID: <20070516194101.GK4095@ftp.linux.org.uk> (raw)
In-Reply-To: <20070516181332.GB16348@cvg>

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.

  reply	other threads:[~2007-05-16 19:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-16 18:13 [PATCH] ALPHA: TITAN - check for allocated memory Cyrill Gorcunov
2007-05-16 19:41 ` Al Viro [this message]
2007-05-17 14:39   ` Cyrill Gorcunov
  -- strict thread matches above, loose matches on Subject: below --
2007-03-19 16:36 Cyrill Gorcunov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070516194101.GK4095@ftp.linux.org.uk \
    --to=viro@ftp.linux.org.uk \
    --cc=akpm@linux-foundation.org \
    --cc=gorcunov@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rth@twiddle.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox