Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 327491
b: refs/heads/master
c: 3a38277
h: refs/heads/master
i:
  327489: 0d4f533
  327487: ea26d1a
v: v3
  • Loading branch information
Sachin Kamat authored and Gustavo Padovan committed Aug 6, 2012
1 parent 07c80a7 commit c6f2f2c
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: eb17ea3b1ce6302e7416c4ba58754fd70ee3ab62
refs/heads/master: 3a382772b51bbf55b23701746102bd75b9fe883f
8 changes: 2 additions & 6 deletions trunk/drivers/bluetooth/btsdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ static int btsdio_probe(struct sdio_func *func,
tuple = tuple->next;
}

data = kzalloc(sizeof(*data), GFP_KERNEL);
data = devm_kzalloc(&func->dev, sizeof(*data), GFP_KERNEL);
if (!data)
return -ENOMEM;

Expand All @@ -315,10 +315,8 @@ static int btsdio_probe(struct sdio_func *func,
skb_queue_head_init(&data->txq);

hdev = hci_alloc_dev();
if (!hdev) {
kfree(data);
if (!hdev)
return -ENOMEM;
}

hdev->bus = HCI_SDIO;
hci_set_drvdata(hdev, data);
Expand All @@ -340,7 +338,6 @@ static int btsdio_probe(struct sdio_func *func,
err = hci_register_dev(hdev);
if (err < 0) {
hci_free_dev(hdev);
kfree(data);
return err;
}

Expand All @@ -366,7 +363,6 @@ static void btsdio_remove(struct sdio_func *func)
hci_unregister_dev(hdev);

hci_free_dev(hdev);
kfree(data);
}

static struct sdio_driver btsdio_driver = {
Expand Down

0 comments on commit c6f2f2c

Please sign in to comment.