Commit 2a98e887 authored by Yang Yingliang's avatar Yang Yingliang Committed by Mauro Carvalho Chehab

media: igorplugusb: use correct size pass to igorplugusb_probe()

After 'buf_in' change to pointer, the sizeof() is not correct buffer
size, it should be MAX_PACKET.

Fixes: b3f820b9 ("media: igorplugusb: respect DMA coherency")
Reported-by: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: default avatarSean Young <sean@mess.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
parent 39146d11
......@@ -170,7 +170,7 @@ static int igorplugusb_probe(struct usb_interface *intf,
ir->request.bRequest = GET_INFRACODE;
ir->request.bRequestType = USB_TYPE_VENDOR | USB_DIR_IN;
ir->request.wLength = cpu_to_le16(sizeof(ir->buf_in));
ir->request.wLength = cpu_to_le16(MAX_PACKET);
ir->urb = usb_alloc_urb(0, GFP_KERNEL);
if (!ir->urb)
......@@ -181,7 +181,7 @@ static int igorplugusb_probe(struct usb_interface *intf,
goto fail;
usb_fill_control_urb(ir->urb, udev,
usb_rcvctrlpipe(udev, 0), (uint8_t *)&ir->request,
ir->buf_in, sizeof(ir->buf_in), igorplugusb_callback, ir);
ir->buf_in, MAX_PACKET, igorplugusb_callback, ir);
usb_make_path(udev, ir->phys, sizeof(ir->phys));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment