Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 327494
b: refs/heads/master
c: 4f8d815
h: refs/heads/master
v: v3
  • Loading branch information
Sachin Kamat authored and Gustavo Padovan committed Aug 6, 2012
1 parent 45947af commit ae7efb6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 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: 98921dbd00c4e2e4bdd56423cb5edf98d57b45f7
refs/heads/master: 4f8d81584964730b08753da34f1e3fb7981cf742
8 changes: 2 additions & 6 deletions trunk/drivers/bluetooth/btwilink.c
Original file line number Diff line number Diff line change
Expand Up @@ -297,16 +297,14 @@ static int bt_ti_probe(struct platform_device *pdev)
struct hci_dev *hdev;
int err;

hst = kzalloc(sizeof(struct ti_st), GFP_KERNEL);
hst = devm_kzalloc(&pdev->dev, sizeof(struct ti_st), GFP_KERNEL);
if (!hst)
return -ENOMEM;

/* Expose "hciX" device to user space */
hdev = hci_alloc_dev();
if (!hdev) {
kfree(hst);
if (!hdev)
return -ENOMEM;
}

BT_DBG("hdev %p", hdev);

Expand All @@ -321,7 +319,6 @@ static int bt_ti_probe(struct platform_device *pdev)
err = hci_register_dev(hdev);
if (err < 0) {
BT_ERR("Can't register HCI device error %d", err);
kfree(hst);
hci_free_dev(hdev);
return err;
}
Expand All @@ -347,7 +344,6 @@ static int bt_ti_remove(struct platform_device *pdev)
hci_unregister_dev(hdev);

hci_free_dev(hdev);
kfree(hst);

dev_set_drvdata(&pdev->dev, NULL);
return 0;
Expand Down

0 comments on commit ae7efb6

Please sign in to comment.