Loading drivers/bluetooth/ath3k.c +17 −4 Original line number Original line Diff line number Diff line Loading @@ -212,15 +212,28 @@ static int ath3k_load_firmware(struct usb_device *udev, const struct firmware *firmware) const struct firmware *firmware) { { u8 *send_buf; u8 *send_buf; int len = 0; int err, pipe, len, size, sent = 0; int err, pipe, size, sent = 0; int count; int count = firmware->size; BT_DBG("udev %p", udev); BT_DBG("udev %p", udev); if (!firmware || !firmware->data || firmware->size <= 0) { err = -EINVAL; BT_ERR("Not a valid FW file"); return err; } count = firmware->size; if (count < FW_HDR_SIZE) { err = -EINVAL; BT_ERR("ath3k loading invalid size of file"); return err; } pipe = usb_sndctrlpipe(udev, 0); pipe = usb_sndctrlpipe(udev, 0); send_buf = kmalloc(BULK_SIZE, GFP_KERNEL); send_buf = kzalloc(BULK_SIZE, GFP_KERNEL); if (!send_buf) { if (!send_buf) { BT_ERR("Can't allocate memory chunk for firmware"); BT_ERR("Can't allocate memory chunk for firmware"); return -ENOMEM; return -ENOMEM; Loading Loading
drivers/bluetooth/ath3k.c +17 −4 Original line number Original line Diff line number Diff line Loading @@ -212,15 +212,28 @@ static int ath3k_load_firmware(struct usb_device *udev, const struct firmware *firmware) const struct firmware *firmware) { { u8 *send_buf; u8 *send_buf; int len = 0; int err, pipe, len, size, sent = 0; int err, pipe, size, sent = 0; int count; int count = firmware->size; BT_DBG("udev %p", udev); BT_DBG("udev %p", udev); if (!firmware || !firmware->data || firmware->size <= 0) { err = -EINVAL; BT_ERR("Not a valid FW file"); return err; } count = firmware->size; if (count < FW_HDR_SIZE) { err = -EINVAL; BT_ERR("ath3k loading invalid size of file"); return err; } pipe = usb_sndctrlpipe(udev, 0); pipe = usb_sndctrlpipe(udev, 0); send_buf = kmalloc(BULK_SIZE, GFP_KERNEL); send_buf = kzalloc(BULK_SIZE, GFP_KERNEL); if (!send_buf) { if (!send_buf) { BT_ERR("Can't allocate memory chunk for firmware"); BT_ERR("Can't allocate memory chunk for firmware"); return -ENOMEM; return -ENOMEM; Loading