From: Yang Yingliang Date: Tue, 28 Jun 2022 06:54:53 +0000 (+0100) Subject: media: igorplugusb: use correct size pass to igorplugusb_probe() X-Git-Tag: v6.6.17~6914^2~131 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2a98e887e0e3cc788f323c52f9e352ad8a01c689;p=platform%2Fkernel%2Flinux-rpi.git 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: b3f820b905c9 ("media: igorplugusb: respect DMA coherency") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/rc/igorplugusb.c b/drivers/media/rc/igorplugusb.c index 12ee5dd..1464ef9 100644 --- a/drivers/media/rc/igorplugusb.c +++ b/drivers/media/rc/igorplugusb.c @@ -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));