From: Dan Carpenter <dan.carpenter@oracle.com>
To: Bjorn Helgaas <bhelgaas@google.com>,
Srikanth Thokala <sthokal@xilinx.com>
Cc: Michal Simek <michal.simek@xilinx.com>,
Grant Likely <grant.likely@linaro.org>,
Rob Herring <robh+dt@kernel.org>,
Srikanth Thokala <sthokal@xilinx.com>,
Arnd Bergmann <arnd@arndb.de>,
linux-pci@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [patch] PCI: xilinx: testing wrong variable in setup irq function
Date: Tue, 9 Sep 2014 15:11:50 +0300 [thread overview]
Message-ID: <20140909121150.GD19760@mwanda> (raw)
We should be testing "hwirq" instead of "irq". "irq" is unsigned so
it's never less than zero. Also it's uninitialized.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/pci/host/pcie-xilinx.c b/drivers/pci/host/pcie-xilinx.c
index 44f8944..ccc496b 100644
--- a/drivers/pci/host/pcie-xilinx.c
+++ b/drivers/pci/host/pcie-xilinx.c
@@ -359,8 +359,8 @@ static int xilinx_pcie_msi_setup_irq(struct msi_chip *chip,
phys_addr_t msg_addr;
hwirq = xilinx_pcie_assign_msi(port);
- if (irq < 0)
- return irq;
+ if (hwirq < 0)
+ return hwirq;
irq = irq_create_mapping(port->irq_domain, hwirq);
if (!irq)
next reply other threads:[~2014-09-09 12:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-09 12:11 Dan Carpenter [this message]
2014-09-09 12:31 ` [patch] PCI: xilinx: testing wrong variable in setup irq function Srikanth Thokala
2014-09-16 23:47 ` Bjorn Helgaas
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=20140909121150.GD19760@mwanda \
--to=dan.carpenter@oracle.com \
--cc=arnd@arndb.de \
--cc=bhelgaas@google.com \
--cc=grant.likely@linaro.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=michal.simek@xilinx.com \
--cc=robh+dt@kernel.org \
--cc=sthokal@xilinx.com \
/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;
as well as URLs for NNTP newsgroup(s).