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: b3f820b905
("media: igorplugusb: respect DMA coherency")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
This commit is contained in:
Родитель
39146d1141
Коммит
2a98e887e0
|
@ -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));
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче