]> www.infradead.org Git - users/hch/dma-mapping.git/commit
usb: usbtest: fix a type promotion bug
authorDan Carpenter <dan.carpenter@linaro.org>
Thu, 5 Oct 2023 14:01:05 +0000 (17:01 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 8 Oct 2023 05:50:36 +0000 (07:50 +0200)
commit0f5aa1b01263b8b621bc4f031a1f2983ef8517b7
treecf1f0f24e55b11eadfc43f34361f0dfc4705cc50
parentb8aaf639b403f01d132c9ac1e906c45debfb0218
usb: usbtest: fix a type promotion bug

The "len" here is sometimes negative error codes from
usb_get_descriptor(), so we don't want to type promote them to unsigned
long.

This bug pre-dates the invention of git.

Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/506f7935-2cba-41d9-ab5d-ddb6ad6320bd@moroto.mountain
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/misc/usbtest.c