PCI: brcmstb: Fix missing mutex_init()
Subsystems (6)
PATCH 1/1 PCI: brcmstb: Fix missing mutex_init()
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 <[email protected]>
--- drivers/pci/controller/pcie-brcmstb.c | 1 + 1 file changed, 1 insertion(+)
drivers/pci/controller/pcie-brcmstb.c +1 -0
@@ -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;
Quoted 7 lines · Wei Yongjun
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 <[email protected]>
Reviewed-by Florian Fainelli <[email protected]>
Signature · 1 line
Florian
Quoted 6 lines · Florian Fainelli
Quoted 3 lines · Wei Yongjun
The driver allocates the mutex but not initialize it. Use
mutex_init()on it to initialize it correctly.
Quoted 6 lines
Quoted 4 lines
This is detected by Coccinelle semantic patch.
Fixes 72af6f6f0d13 ("PCI: brcmstb: Add MSI support")Signed-off-by Wei Yongjun <[email protected]>Reviewed-by Florian Fainelli <[email protected]>
I have squashed it in in my pci/brcmstb branch, thanks.
Lorenzo