linux/drivers/media/usb/b2c2
Hans Verkuil b178aa6f33 media: b2c2: flexcop-usb: fix flexcop_usb_memory_req
smatch generated this warning:

drivers/media/usb/b2c2/flexcop-usb.c:199 flexcop_usb_memory_req() warn: iterator 'i' not incremented

and indeed the function is not using i or updating buf.

The reason this always worked is that this function is called to write just
6 bytes (a MAC address) to the USB device, and so in practice there is only
a single chunk written. If we ever would need to write more than one chunk,
this function would fail since each chunk would read from or write to the
same buf address.

Rewrite the function to properly handle this.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2024-06-24 11:05:07 +02:00
..
flexcop-usb.c media: b2c2: flexcop-usb: fix flexcop_usb_memory_req 2024-06-24 11:05:07 +02:00
flexcop-usb.h media: flexcop-usb: fix control-message timeouts 2021-11-19 06:04:53 +00:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00