From: Tejun Heo <tj@kernel.org>
To: Yoichi Yuasa <yuasa@linux-mips.org>
Cc: Jeff Garzik <jgarzik@pobox.com>, linux-ide@vger.kernel.org
Subject: Re: [PATCH] sata_sil: fix uninitialized variable use when sil_scr_read() fails
Date: Wed, 21 Oct 2009 14:00:19 +0900 [thread overview]
Message-ID: <4ADE9563.2030705@kernel.org> (raw)
In-Reply-To: <20091020153456.9104e044.yuasa@linux-mips.org>
Yoichi Yuasa wrote:
> Signed-off-by: Yoichi Yuasa <yuasa@linux-mips.org>
>
> ---
> drivers/ata/sata_sil.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/ata/sata_sil.c b/drivers/ata/sata_sil.c
> index 3cb69d5..d7fff6b 100644
> --- a/drivers/ata/sata_sil.c
> +++ b/drivers/ata/sata_sil.c
> @@ -439,7 +439,7 @@ static void sil_host_intr(struct ata_port *ap, u32 bmdma2)
> u8 status;
>
> if (unlikely(bmdma2 & SIL_DMA_SATA_IRQ)) {
> - u32 serror;
> + u32 serror = 0;
The first usage of that is
sil_scr_read(&ap->link, SCR_ERROR, &serror);
which sets the value. So, I don't think the patch is necessary. If
it triggers a compile warning, putting uninitialized_var() macro will
be more appropriate.
Thanks.
--
tejun
next prev parent reply other threads:[~2009-10-21 14:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-20 6:34 [PATCH] sata_sil: fix uninitialized variable use when sil_scr_read() fails Yoichi Yuasa
2009-10-21 5:00 ` Tejun Heo [this message]
2009-10-22 0:17 ` Yuasa Yoichi
2009-10-26 15:12 ` Tejun Heo
2009-10-27 1:37 ` Yoichi Yuasa
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=4ADE9563.2030705@kernel.org \
--to=tj@kernel.org \
--cc=jgarzik@pobox.com \
--cc=linux-ide@vger.kernel.org \
--cc=yuasa@linux-mips.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.