projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
38ca285
)
mmc: cb710: fix possible pci_dev leak in cb710_pci_configure()
author
Michał Mirosław
<
[email protected]
>
Thu, 28 Jul 2011 18:55:27 +0000
(20:55 +0200)
committer
Chris Ball
<
[email protected]
>
Sat, 13 Aug 2011 18:50:23 +0000
(14:50 -0400)
Reported-by: Julia Lawall <
[email protected]
>
Signed-off-by: Michał Mirosław <
[email protected]
>
Signed-off-by: Chris Ball <
[email protected]
>
drivers/misc/cb710/core.c
patch
|
blob
|
history
diff --git
a/drivers/misc/cb710/core.c
b/drivers/misc/cb710/core.c
index efec4139c3f68f512cded3fd51631e7097895d19..68cd05b6d829d1f3b7fa15f256f78b3bb6f82f82 100644
(file)
--- a/
drivers/misc/cb710/core.c
+++ b/
drivers/misc/cb710/core.c
@@
-33,7
+33,7
@@
EXPORT_SYMBOL_GPL(cb710_pci_update_config_reg);
static int __devinit cb710_pci_configure(struct pci_dev *pdev)
{
unsigned int devfn = PCI_DEVFN(PCI_SLOT(pdev->devfn), 0);
- struct pci_dev *pdev0
= pci_get_slot(pdev->bus, devfn)
;
+ struct pci_dev *pdev0;
u32 val;
cb710_pci_update_config_reg(pdev, 0x48,
@@
-43,6
+43,7
@@
static int __devinit cb710_pci_configure(struct pci_dev *pdev)
if (val & 0x80000000)
return 0;
+ pdev0 = pci_get_slot(pdev->bus, devfn);
if (!pdev0)
return -ENODEV;