An interesting catch.
The test on line 249 should probably be (maxp > ONETOUCH_PKT_LEN ?
ONETOUCH_PKT_LEN : maxp) -- in other words, limit the interrupt
transfer to the smaller of 2 or max packet size for the endpoint.
There is a similar (correctly done) test in usb_stor_intr_transfer in
transport
Hello Matthew Dharm,
This is an old warning but it looks like it might be valid.
The patch 34008dbfe8c0: "[PATCH] USB Storage: add support for Maxtor
One-Touch button" from Jul 28, 2005, leads to the following Smatch
warning:
"drivers/usb/storage/onetouch.c:248 onetouch_connect_input()