Message ID | 20191127072202.30625-2-lee.jones@linaro.org |
---|---|
State | Superseded |
Headers | show |
Series | [4.14,1/5] ARM: 8904/1: skip nomap memblocks while finding the lowmem/highmem boundary | expand |
diff --git a/drivers/media/usb/siano/smsusb.c b/drivers/media/usb/siano/smsusb.c index ec759f43c634..3ab72d653737 100644 --- a/drivers/media/usb/siano/smsusb.c +++ b/drivers/media/usb/siano/smsusb.c @@ -226,10 +226,9 @@ static int smsusb_sendrequest(void *context, void *buffer, size_t size) return -ENOENT; } - phdr = kmalloc(size, GFP_KERNEL); + phdr = kmemdup(buffer, size, GFP_KERNEL); if (!phdr) return -ENOMEM; - memcpy(phdr, buffer, size); pr_debug("sending %s(%d) size: %d\n", smscore_translate_msg(phdr->msg_type), phdr->msg_type,