Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 357679
b: refs/heads/master
c: ff7109f
h: refs/heads/master
i:
  357677: e073b74
  357675: f230148
  357671: d99aa2a
  357663: 957b55c
v: v3
  • Loading branch information
Aaron Sierra authored and Samuel Ortiz committed Feb 15, 2013
1 parent ce6bf33 commit bd081fc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3ec3090cf14ec0920a5fbe976b5aafd6084db435
refs/heads/master: ff7109fa632654eaef657186f2942f5b679023d6
7 changes: 2 additions & 5 deletions trunk/drivers/mfd/lpc_ich.c
Original file line number Diff line number Diff line change
Expand Up @@ -916,7 +916,8 @@ static int lpc_ich_probe(struct pci_dev *dev,
int ret;
bool cell_added = false;

priv = kmalloc(GFP_KERNEL, sizeof(struct lpc_ich_priv));
priv = devm_kzalloc(&dev->dev,
sizeof(struct lpc_ich_priv), GFP_KERNEL);
if (!priv)
return -ENOMEM;

Expand Down Expand Up @@ -952,7 +953,6 @@ static int lpc_ich_probe(struct pci_dev *dev,
dev_warn(&dev->dev, "No MFD cells added\n");
lpc_ich_restore_config_space(dev);
pci_set_drvdata(dev, NULL);
kfree(priv);
return -ENODEV;
}

Expand All @@ -961,12 +961,9 @@ static int lpc_ich_probe(struct pci_dev *dev,

static void lpc_ich_remove(struct pci_dev *dev)
{
void *priv = pci_get_drvdata(dev);

mfd_remove_devices(&dev->dev);
lpc_ich_restore_config_space(dev);
pci_set_drvdata(dev, NULL);
kfree(priv);
}

static struct pci_driver lpc_ich_driver = {
Expand Down

0 comments on commit bd081fc

Please sign in to comment.