Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 327486
b: refs/heads/master
c: 0213cd8
h: refs/heads/master
v: v3
  • Loading branch information
Sachin Kamat authored and Gustavo Padovan committed Aug 6, 2012
1 parent 8cc2fa9 commit ec29a56
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 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: 9357cc60789cfdcbbeeff85d9c423a91d621ae1f
refs/heads/master: 0213cd8d5ed9cee1d7ffd95566319af1bb36a604
12 changes: 4 additions & 8 deletions trunk/drivers/bluetooth/bfusb.c
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@ static int bfusb_probe(struct usb_interface *intf, const struct usb_device_id *i
}

/* Initialize control structure and load firmware */
data = kzalloc(sizeof(struct bfusb_data), GFP_KERNEL);
data = devm_kzalloc(&intf->dev, sizeof(struct bfusb_data), GFP_KERNEL);
if (!data) {
BT_ERR("Can't allocate memory for control structure");
goto done;
Expand All @@ -674,7 +674,7 @@ static int bfusb_probe(struct usb_interface *intf, const struct usb_device_id *i

if (request_firmware(&firmware, "bfubase.frm", &udev->dev) < 0) {
BT_ERR("Firmware request failed");
goto error;
goto done;
}

BT_DBG("firmware data %p size %zu", firmware->data, firmware->size);
Expand All @@ -690,7 +690,7 @@ static int bfusb_probe(struct usb_interface *intf, const struct usb_device_id *i
hdev = hci_alloc_dev();
if (!hdev) {
BT_ERR("Can't allocate HCI device");
goto error;
goto done;
}

data->hdev = hdev;
Expand All @@ -708,7 +708,7 @@ static int bfusb_probe(struct usb_interface *intf, const struct usb_device_id *i
if (hci_register_dev(hdev) < 0) {
BT_ERR("Can't register HCI device");
hci_free_dev(hdev);
goto error;
goto done;
}

usb_set_intfdata(intf, data);
Expand All @@ -718,9 +718,6 @@ static int bfusb_probe(struct usb_interface *intf, const struct usb_device_id *i
release:
release_firmware(firmware);

error:
kfree(data);

done:
return -EIO;
}
Expand All @@ -741,7 +738,6 @@ static void bfusb_disconnect(struct usb_interface *intf)

hci_unregister_dev(hdev);
hci_free_dev(hdev);
kfree(data);
}

static struct usb_driver bfusb_driver = {
Expand Down

0 comments on commit ec29a56

Please sign in to comment.