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:
Yang Yingliang 2022-06-28 07:54:53 +01:00 коммит произвёл Mauro Carvalho Chehab
Родитель 39146d1141
Коммит 2a98e887e0
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -170,7 +170,7 @@ static int igorplugusb_probe(struct usb_interface *intf,
ir->request.bRequest = GET_INFRACODE; ir->request.bRequest = GET_INFRACODE;
ir->request.bRequestType = USB_TYPE_VENDOR | USB_DIR_IN; 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); ir->urb = usb_alloc_urb(0, GFP_KERNEL);
if (!ir->urb) if (!ir->urb)
@ -181,7 +181,7 @@ static int igorplugusb_probe(struct usb_interface *intf,
goto fail; goto fail;
usb_fill_control_urb(ir->urb, udev, usb_fill_control_urb(ir->urb, udev,
usb_rcvctrlpipe(udev, 0), (uint8_t *)&ir->request, 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)); usb_make_path(udev, ir->phys, sizeof(ir->phys));