media: m920x: don't use stack on USB reads
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 6 Dec 2021 14:34:19 +0000 (15:34 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jan 2022 09:54:14 +0000 (10:54 +0100)
commit830e5d1b4344c2575020ee4bdf63fb48e2b56ce3
tree32902482c5dd3b1627d3ddf76c3ec0e09bc5a9b6
parentc33f0f22bfea375bf96d0b43a3242fa8a31f10c6
media: m920x: don't use stack on USB reads

[ Upstream commit a2ab06d7c4d6bfd0b545a768247a70463e977e27 ]

Using stack-allocated pointers for USB message data don't work.
This driver is almost OK with that, except for the I2C read
logic.

Fix it by using a temporary read buffer, just like on all other
calls to m920x_read().

Link: https://lore.kernel.org/all/ccc99e48-de4f-045e-0fe4-61e3118e3f74@mida.se/
Reported-by: rkardell@mida.se
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/usb/dvb-usb/m920x.c