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>
Wed, 22 Jun 2022 12:22:03 +0000 (14:22 +0200)
commit31ac1cffa76b8996974ef4377cb08c0ccdf92669
tree1a05ee45ae6f8a5ddf39952f2a1b6ed5b49a5a37
parent57199e4ee958ade368e8fa7e2d79d45e37fe412e
comedi: vmk80xx: fix expression for tx buffer size

commit 242439f7e279d86b3f73b5de724bc67b2f8aeb07 upstream.

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: a23461c47482 ("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