diff options
Diffstat (limited to 'drivers/staging/comedi/drivers/usbdux.c')
-rw-r--r-- | drivers/staging/comedi/drivers/usbdux.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/comedi/drivers/usbdux.c b/drivers/staging/comedi/drivers/usbdux.c index df71515c7a30..86f035d00675 100644 --- a/drivers/staging/comedi/drivers/usbdux.c +++ b/drivers/staging/comedi/drivers/usbdux.c @@ -840,13 +840,12 @@ static int firmwareUpload(struct usbduxsub *usbduxsub, } /* we generate a local buffer for the firmware */ - fwBuf = kzalloc(sizeFirmware, GFP_KERNEL); + fwBuf = kmemdup(firmwareBinary, sizeFirmware, GFP_KERNEL); if (!fwBuf) { dev_err(&usbduxsub->interface->dev, "comedi_: mem alloc for firmware failed\n"); return -ENOMEM; } - memcpy(fwBuf, firmwareBinary, sizeFirmware); ret = usbduxsub_stop(usbduxsub); if (ret < 0) { |