media: usb: s2255: Refactor s2255_get_fx2fw
authorRicardo Ribalda <ribalda@chromium.org>
Sun, 28 Jan 2024 16:13:57 +0000 (16:13 +0000)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Wed, 28 Feb 2024 15:00:32 +0000 (16:00 +0100)
commitc5b9b85a60652b89500bba1325070b6f838626f4
tree8d104792b5ca6682baeec63f95871dc948d24c77
parent8796f3357f767da75b46fe9cc957546f458f4502
media: usb: s2255: Refactor s2255_get_fx2fw

Resize the buffer to the actual size needed and initialize it. With this
we can convince gcc-11 that the variable is not used uninitialized.

drivers/media/usb/s2255/s2255drv.c:1914:25: warning: 'transBuffer' may be used uninitialized [-Wmaybe-uninitialized]

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
drivers/media/usb/s2255/s2255drv.c