diff options
| author | Dan Carpenter <[email protected]> | 2024-09-12 08:54:09 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2024-09-13 05:41:12 +0000 |
| commit | e8afd5ace118fe3a508cd6f2aa21e2da150bed48 (patch) | |
| tree | 65f6d8885966d549ad8386a515b9eaf097513afd /drivers/usb/class/cdc-acm.c | |
| parent | usb: storage: ene_ub6250: Fix right shift warnings (diff) | |
| download | kernel-e8afd5ace118fe3a508cd6f2aa21e2da150bed48.tar.gz kernel-e8afd5ace118fe3a508cd6f2aa21e2da150bed48.zip | |
usb: dwc3: rtk: Clean up error code in __get_dwc3_maximum_speed()
The __get_dwc3_maximum_speed() function returns an enum type which, in
this context here, is basically unsigned int. On error cases, it's
supposed to return USB_SPEED_UNKNOWN, but it was accidentally changed to
return negative error codes in commit f93e96c544ca ("usb: dwc3: rtk: use
scoped device node handling to simplify error paths").
There is only one caller and because of the way that the types work out,
returning negative error codes is not a problem. They will be treated
as greater than USB_SPEED_HIGH and ignored as invalid. So this patch
does not affect run time behavior, it's just a clean up.
Signed-off-by: Dan Carpenter <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'drivers/usb/class/cdc-acm.c')
0 files changed, 0 insertions, 0 deletions
