[PATCH -next] media: igorplugusb: use correct size pass to igorplugusb_probe()
From: Yang Yingliang
Date: Tue Jun 28 2022 - 02:45:11 EST
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@xxxxxxxxxx>
Signed-off-by: Yang Yingliang <yangyingliang@xxxxxxxxxx>
---
drivers/media/rc/igorplugusb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/rc/igorplugusb.c b/drivers/media/rc/igorplugusb.c
index 12ee5dd0a61a..22348e91d0b1 100644
--- a/drivers/media/rc/igorplugusb.c
+++ b/drivers/media/rc/igorplugusb.c
@@ -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));
--
2.25.1