staging: r8188eu: Hal_MappingOutPipe should return an int
authorMartin Kaiser <martin@kaiser.cx>
Sat, 6 Aug 2022 19:55:28 +0000 (21:55 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 16 Aug 2022 13:17:57 +0000 (15:17 +0200)
commita3cba3f05fdb249cbe1248763ffe3e0ea69f7284
treecb9e25736db6f5e4e4330e9551617f1303b49a63
parentb5b26f1da5d9906a876693cc7598c54937a907d5
staging: r8188eu: Hal_MappingOutPipe should return an int

Update the Hal_MappingOutPipe function to return 0 for success or -EXNIO
if the caller requested more than the number of available endpoints.
This error code is also used by usb_find_common_endpoints if a requested
endpoint was not found.

Unlike a boolean return value, a negative error code can be returned to
external functions that call the r8188eu driver, e.g. to the caller of our
probe function.

HalUsbSetQueuePipeMapping8188EUsb passes the return value of
Hal_MappingOutPipe on to its caller. We have to change its return type
from bool to int as well.

Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220806195540.777390-2-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/hal/hal_com.c
drivers/staging/r8188eu/hal/usb_halinit.c
drivers/staging/r8188eu/include/hal_com.h