diff options
author | Yang Yingliang <yangyingliang@huawei.com> | 2022-06-28 07:54:53 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@kernel.org> | 2022-07-15 14:52:20 +0100 |
commit | 2a98e887e0e3cc788f323c52f9e352ad8a01c689 (patch) | |
tree | 43606b94456fc4ea2928c2d2a7cfd612b1e6183d /drivers/media/rc | |
parent | 39146d11411cddda8a7bcabc2c7deb0ddea865a4 (diff) |
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 <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>
Diffstat (limited to 'drivers/media/rc')
-rw-r--r-- | drivers/media/rc/igorplugusb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/rc/igorplugusb.c b/drivers/media/rc/igorplugusb.c index 12ee5dd0a61a..1464ef9c55bc 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)); |