Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 351864
b: refs/heads/master
c: 29b7d9a
h: refs/heads/master
v: v3
  • Loading branch information
Julia Lawall authored and John W. Linville committed Jan 11, 2013
1 parent 9e94382 commit c796e33
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 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: e93d083f42a126b5ad8137b5f0e8d6f900b332b8
refs/heads/master: 29b7d9ad9112a95757c8030421dc3bd1b28ad8b5
9 changes: 2 additions & 7 deletions trunk/drivers/nfc/nfcwilink.c
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ static int nfcwilink_probe(struct platform_device *pdev)

nfc_dev_dbg(&pdev->dev, "probe entry");

drv = kzalloc(sizeof(struct nfcwilink), GFP_KERNEL);
drv = devm_kzalloc(&pdev->dev, sizeof(struct nfcwilink), GFP_KERNEL);
if (!drv) {
rc = -ENOMEM;
goto exit;
Expand All @@ -547,7 +547,7 @@ static int nfcwilink_probe(struct platform_device *pdev)
if (!drv->ndev) {
nfc_dev_err(&pdev->dev, "nci_allocate_device failed");
rc = -ENOMEM;
goto free_exit;
goto exit;
}

nci_set_parent_dev(drv->ndev, &pdev->dev);
Expand All @@ -566,9 +566,6 @@ static int nfcwilink_probe(struct platform_device *pdev)
free_dev_exit:
nci_free_device(drv->ndev);

free_exit:
kfree(drv);

exit:
return rc;
}
Expand All @@ -588,8 +585,6 @@ static int nfcwilink_remove(struct platform_device *pdev)
nci_unregister_device(ndev);
nci_free_device(ndev);

kfree(drv);

dev_set_drvdata(&pdev->dev, NULL);

return 0;
Expand Down

0 comments on commit c796e33

Please sign in to comment.