From: Wei Yongjun <weiyongjun1@huawei.com>
To: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
Andrew Murray <andrew.murray@arm.com>,
Bjorn Helgaas <bhelgaas@google.com>,
"Florian Fainelli" <f.fainelli@gmail.com>,
Jim Quinlan <james.quinlan@broadcom.com>
Cc: Wei Yongjun <weiyongjun1@huawei.com>,
<bcm-kernel-feedback-list@broadcom.com>,
<linux-pci@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<kernel-janitors@vger.kernel.org>
Subject: [PATCH -next] PCI: brcmstb: Fix missing mutex_init()
Date: Sun, 19 Jan 2020 02:30:03 +0000 [thread overview]
Message-ID: <20200119023003.100987-1-weiyongjun1@huawei.com> (raw)
The driver allocates the mutex but not initialize it.
Use mutex_init() on it to initialize it correctly.
This is detected by Coccinelle semantic patch.
Fixes: 72af6f6f0d13 ("PCI: brcmstb: Add MSI support")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
drivers/pci/controller/pcie-brcmstb.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/pci/controller/pcie-brcmstb.c b/drivers/pci/controller/pcie-brcmstb.c
index 43cba76c0e1e..065bada9cfad 100644
--- a/drivers/pci/controller/pcie-brcmstb.c
+++ b/drivers/pci/controller/pcie-brcmstb.c
@@ -528,6 +528,7 @@ static int brcm_pcie_enable_msi(struct brcm_pcie *pcie)
if (!msi)
return -ENOMEM;
+ mutex_init(&msi->lock);
msi->dev = dev;
msi->base = pcie->base;
msi->np = pcie->np;
next reply other threads:[~2020-01-19 2:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-19 2:30 Wei Yongjun [this message]
2020-01-19 17:50 ` [PATCH -next] PCI: brcmstb: Fix missing mutex_init() Florian Fainelli
2020-01-20 10:54 ` Lorenzo Pieralisi
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=20200119023003.100987-1-weiyongjun1@huawei.com \
--to=weiyongjun1@huawei.com \
--cc=andrew.murray@arm.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=bhelgaas@google.com \
--cc=f.fainelli@gmail.com \
--cc=james.quinlan@broadcom.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-pci@vger.kernel.org \
--cc=lorenzo.pieralisi@arm.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).