From: Cyrill Gorcunov <gorcunov@gmail.com>
To: Jaswinder Singh Rajput <jaswinder@kernel.org>
Cc: Ingo Molnar <mingo@elte.hu>, Joerg Roedel <joerg.roedel@amd.com>,
x86 maintainers <x86@kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH -tip] x86: amd_iommu_init.c use NULL pointer
Date: Thu, 14 May 2009 07:00:16 +0400 [thread overview]
Message-ID: <aa79d98a0905132000g18629ebx7f260eca03a810fc@mail.gmail.com> (raw)
In-Reply-To: <1242253628.3364.26.camel@localhost.localdomain>
On 5/14/09, Jaswinder Singh Rajput <jaswinder@kernel.org> wrote:
>
> Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
> ---
> arch/x86/kernel/amd_iommu_init.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/x86/kernel/amd_iommu_init.c
> b/arch/x86/kernel/amd_iommu_init.c
> index 8c0be09..f728b12 100644
> --- a/arch/x86/kernel/amd_iommu_init.c
> +++ b/arch/x86/kernel/amd_iommu_init.c
> @@ -898,7 +898,7 @@ static int __init init_exclusion_range(struct
> ivmd_header *m)
> /* called for unity map ACPI definition */
> static int __init init_unity_map_range(struct ivmd_header *m)
> {
> - struct unity_map_entry *e = 0;
> + struct unity_map_entry *e = NULL;
>
> e = kzalloc(sizeof(*e), GFP_KERNEL);
> if (e == NULL)
> --
> 1.6.0.6
>
Hi Jaswinder,
I believe you could get rid of such init completely. We do check 'e'
after kzalloc anyway.
next prev parent reply other threads:[~2009-05-14 3:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-13 22:27 [PATCH -tip] x86: amd_iommu_init.c use NULL pointer Jaswinder Singh Rajput
2009-05-14 3:00 ` Cyrill Gorcunov [this message]
2009-05-14 4:37 ` Jaswinder Singh Rajput
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=aa79d98a0905132000g18629ebx7f260eca03a810fc@mail.gmail.com \
--to=gorcunov@gmail.com \
--cc=jaswinder@kernel.org \
--cc=joerg.roedel@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=x86@kernel.org \
/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