[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1248963420.16129.0.camel@johannes.local>
Date: Thu, 30 Jul 2009 16:17:00 +0200
From: Johannes Berg <johannes@...solutions.net>
To: Julia Lawall <julia@...u.dk>
Cc: linuxppc-dev@...abs.org, alsa-devel@...a-project.org,
linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [PATCH 5/5] sound/aoa: Add kmalloc NULL tests
On Thu, 2009-07-30 at 16:11 +0200, Julia Lawall wrote:
> From: Julia Lawall <julia@...u.dk>
>
> Check that the result of kzalloc is not NULL before a dereference.
> irq_client = kzalloc(sizeof(struct pmf_irq_client),
> GFP_KERNEL);
> + if (!irq_client) {
> + err = -ENOMEM;
> + printk(KERN_ERR "snd-aoa: gpio layer failed to"
> + " register %s irq (%d)\n", name, err);
> + goto out_unlock;
> + }
Looks good, thanks, but I'd really drop the printk if only to not have
the string there, that doesn't really seem interesting.
johannes
Download attachment "signature.asc" of type "application/pgp-signature" (802 bytes)
Powered by blists - more mailing lists