* [PATCH -next] PCI: brcmstb: Fix missing mutex_init()
@ 2020-01-19 2:30 Wei Yongjun
2020-01-19 17:50 ` Florian Fainelli
0 siblings, 1 reply; 3+ messages in thread
From: Wei Yongjun @ 2020-01-19 2:30 UTC (permalink / raw)
To: Lorenzo Pieralisi, Andrew Murray, Bjorn Helgaas, Florian Fainelli,
Jim Quinlan
Cc: Wei Yongjun, bcm-kernel-feedback-list, linux-pci,
linux-arm-kernel, kernel-janitors
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;
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH -next] PCI: brcmstb: Fix missing mutex_init()
2020-01-19 2:30 [PATCH -next] PCI: brcmstb: Fix missing mutex_init() Wei Yongjun
@ 2020-01-19 17:50 ` Florian Fainelli
2020-01-20 10:54 ` Lorenzo Pieralisi
0 siblings, 1 reply; 3+ messages in thread
From: Florian Fainelli @ 2020-01-19 17:50 UTC (permalink / raw)
To: Wei Yongjun, Lorenzo Pieralisi, Andrew Murray, Bjorn Helgaas,
Jim Quinlan
Cc: bcm-kernel-feedback-list, linux-pci, linux-arm-kernel,
kernel-janitors
On 1/18/2020 6:30 PM, Wei Yongjun wrote:
> 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>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
--
Florian
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH -next] PCI: brcmstb: Fix missing mutex_init()
2020-01-19 17:50 ` Florian Fainelli
@ 2020-01-20 10:54 ` Lorenzo Pieralisi
0 siblings, 0 replies; 3+ messages in thread
From: Lorenzo Pieralisi @ 2020-01-20 10:54 UTC (permalink / raw)
To: Florian Fainelli
Cc: Wei Yongjun, Andrew Murray, Bjorn Helgaas, Jim Quinlan,
bcm-kernel-feedback-list, linux-pci, linux-arm-kernel,
kernel-janitors
On Sun, Jan 19, 2020 at 09:50:09AM -0800, Florian Fainelli wrote:
>
>
> On 1/18/2020 6:30 PM, Wei Yongjun wrote:
> > 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>
>
> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
I have squashed it in in my pci/brcmstb branch, thanks.
Lorenzo
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-01-20 10:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-19 2:30 [PATCH -next] PCI: brcmstb: Fix missing mutex_init() Wei Yongjun
2020-01-19 17:50 ` Florian Fainelli
2020-01-20 10:54 ` Lorenzo Pieralisi
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).