From: Len Brown <lenb@kernel.org>
To: Dan Carpenter <error27@gmail.com>
Cc: linux-acpi@vger.kernel.org
Subject: Re: [patch] move null check earlier
Date: Wed, 09 Dec 2009 15:39:43 -0500 (EST) [thread overview]
Message-ID: <alpine.LFD.2.00.0912091539130.24891@localhost.localdomain> (raw)
In-Reply-To: <alpine.DEB.2.00.0911081929420.10055@bicker>
Julia's patch to fix this shipped in Linux-2.6.32-rc7
cheers,
Len Brown, Intel Open Source Technology Center
On Tue, 10 Nov 2009, Dan Carpenter wrote:
> I moved the null dereference after the check. It is unlikely to make any
> difference, but it's the right thing to do and it makes my static checker
> happy.
>
> regards,
> dan carpenter
>
> Signed-off-by: Dan Carpenter <error27@gmail.com>
>
> --- orig/drivers/acpi/processor_throttling.c 2009-11-08 19:26:09.000000000 +0200
> +++ devel/drivers/acpi/processor_throttling.c 2009-11-08 19:27:10.000000000 +0200
> @@ -1133,15 +1133,15 @@
> int result = 0;
> struct acpi_processor_throttling *pthrottling;
>
> + if (!pr)
> + return -EINVAL;
> +
> ACPI_DEBUG_PRINT((ACPI_DB_INFO,
> "pblk_address[0x%08x] duty_offset[%d] duty_width[%d]\n",
> pr->throttling.address,
> pr->throttling.duty_offset,
> pr->throttling.duty_width));
>
> - if (!pr)
> - return -EINVAL;
> -
> /*
> * Evaluate _PTC, _TSS and _TPC
> * They must all be present or none of them can be used.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
prev parent reply other threads:[~2009-12-09 20:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-10 8:56 [patch] move null check earlier Dan Carpenter
2009-12-09 20:39 ` Len Brown [this message]
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=alpine.LFD.2.00.0912091539130.24891@localhost.localdomain \
--to=lenb@kernel.org \
--cc=error27@gmail.com \
--cc=linux-acpi@vger.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