From: Dan Carpenter <dan.carpenter@oracle.com>
To: Borislav Petkov <bp@alien8.de>
Cc: Channagoud Kadabi <ckadabi@codeaurora.org>,
Venkata Narendra Kumar Gutta <vnkgutta@codeaurora.org>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
linux-edac@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: edac: qcom_edac: uninitialized variable in IRQ handler
Date: Thu, 18 Oct 2018 15:32:53 +0300 [thread overview]
Message-ID: <20181018123253.h77xdz6aq24rn22b@mwanda> (raw)
On Thu, Oct 18, 2018 at 02:27:14PM +0200, Borislav Petkov wrote:
> On Thu, Oct 18, 2018 at 10:38:07AM +0300, Dan Carpenter wrote:
> > We forgot to set "irq_handled" to false, so it's either true or
> > uninitialized.
> >
> > Fixes: 27450653f1db ("drivers: edac: Add EDAC driver support for QCOM SoCs")
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> > ---
> > drivers/edac/qcom_edac.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/edac/qcom_edac.c b/drivers/edac/qcom_edac.c
> > index 82bd775124f2..f8510a024fe5 100644
> > --- a/drivers/edac/qcom_edac.c
> > +++ b/drivers/edac/qcom_edac.c
> > @@ -292,7 +292,7 @@ llcc_ecc_irq_handler(int irq, void *edev_ctl)
> > struct llcc_drv_data *drv = edac_dev_ctl->pvt_info;
> > irqreturn_t irq_rc = IRQ_NONE;
> > u32 drp_error, trp_error, i;
> > - bool irq_handled;
> > + bool irq_handled = false;
>
> That variable is just silly. One can simply do:
>
> if (!ret)
> irq_rc = IRQ_HANDLED;
>
> in both places and
>
> return irq_rc;
>
> at the end and remove irq_handled altogether. Problem solved.
>
Yeah. That's cleaner. I will resend.
regards,
dan carpenter
next reply other threads:[~2018-10-18 12:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-18 12:32 Dan Carpenter [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-10-18 12:27 edac: qcom_edac: uninitialized variable in IRQ handler Borislav Petkov
2018-10-18 7:38 Dan Carpenter
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=20181018123253.h77xdz6aq24rn22b@mwanda \
--to=dan.carpenter@oracle.com \
--cc=bp@alien8.de \
--cc=ckadabi@codeaurora.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-edac@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=vnkgutta@codeaurora.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