Skip to content

Commit

Permalink
[SPARC64]: Add missing pci_dev_put
Browse files Browse the repository at this point in the history
There should be a pci_dev_put when breaking out of a loop that iterates
over calls to pci_get_device and similar functions.

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Julia Lawall authored and David S. Miller committed Dec 5, 2007
1 parent 874a5f8 commit 55c45a3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/sparc64/kernel/isa.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ void __init isa_init(void)
isa_br = kzalloc(sizeof(*isa_br), GFP_KERNEL);
if (!isa_br) {
printk(KERN_DEBUG "isa: cannot allocate sparc_isa_bridge");
pci_dev_put(pdev);
return;
}

Expand All @@ -168,6 +169,7 @@ void __init isa_init(void)
printk(KERN_DEBUG "isa: device registration error for %s!\n",
dp->path_component_name);
kfree(isa_br);
pci_dev_put(pdev);
return;
}

Expand Down

0 comments on commit 55c45a3

Please sign in to comment.