]> git.baikalelectronics.ru Git - kernel.git/commit
comedi: vmk80xx: fix expression for tx buffer size
authorIan Abbott <abbotti@mev.co.uk>
Tue, 7 Jun 2022 17:18:19 +0000 (18:18 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Jun 2022 13:21:23 +0000 (15:21 +0200)
commit09296a4c2034fc0c5f2e1119d5b21bfb7468198e
treee305168a0ce30eb5938c50c975009e935cadcaaa
parentcf1710d1388cf5bd81996b258399c4907d27006e
comedi: vmk80xx: fix expression for tx buffer size

The expression for setting the size of the allocated bulk TX buffer
(`devpriv->usb_tx_buf`) is calling `usb_endpoint_maxp(devpriv->ep_rx)`,
which is using the wrong endpoint (should be `devpriv->ep_tx`).  Fix it.

Fixes: d31380be49bd ("comedi: vmk80xx: fix transfer-buffer overflow")
Cc: Johan Hovold <johan@kernel.org>
Cc: stable@vger.kernel.org # 4.9+
Reviewed-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Link: https://lore.kernel.org/r/20220607171819.4121-1-abbotti@mev.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/comedi/drivers/vmk80xx.c