aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/bluetooth')
-rw-r--r--drivers/bluetooth/bcm203x.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/bluetooth/bcm203x.c b/drivers/bluetooth/bcm203x.c
index b0c84c19f442..8b1b643a519b 100644
--- a/drivers/bluetooth/bcm203x.c
+++ b/drivers/bluetooth/bcm203x.c
@@ -224,7 +224,7 @@ static int bcm203x_probe(struct usb_interface *intf, const struct usb_device_id
224 224
225 BT_DBG("firmware data %p size %zu", firmware->data, firmware->size); 225 BT_DBG("firmware data %p size %zu", firmware->data, firmware->size);
226 226
227 data->fw_data = kmalloc(firmware->size, GFP_KERNEL); 227 data->fw_data = kmemdup(firmware->data, firmware->size, GFP_KERNEL);
228 if (!data->fw_data) { 228 if (!data->fw_data) {
229 BT_ERR("Can't allocate memory for firmware image"); 229 BT_ERR("Can't allocate memory for firmware image");
230 release_firmware(firmware); 230 release_firmware(firmware);
@@ -234,7 +234,6 @@ static int bcm203x_probe(struct usb_interface *intf, const struct usb_device_id
234 return -ENOMEM; 234 return -ENOMEM;
235 } 235 }
236 236
237 memcpy(data->fw_data, firmware->data, firmware->size);
238 data->fw_size = firmware->size; 237 data->fw_size = firmware->size;
239 data->fw_sent = 0; 238 data->fw_sent = 0;
240 239