]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/udl: Handle errors from usb_get_descriptor()
authorThomas Zimmermann <tzimmermann@suse.de>
Thu, 10 Apr 2025 10:59:02 +0000 (12:59 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Mon, 14 Apr 2025 08:19:19 +0000 (10:19 +0200)
commit895452ae48c1e179df509b6184227a5ea40b4f38
treef533cd7bd1b712baf7b1d93d6a8b69965a681c7b
parent89323678d8280f4f8e5971124d3aef8a6dfece0a
drm/udl: Handle errors from usb_get_descriptor()

Reading the vendor descriptor from the udl device can fail with
an error, which the current code fails to capture. Store the return
value in an integer and test for the error. Abort parsing on errors
or treat the value as length on success.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Link: https://lore.kernel.org/r/20250410105948.25463-6-tzimmermann@suse.de
drivers/gpu/drm/udl/udl_main.c