staging: r8188eu: always process urb status
authorMartin Kaiser <martin@kaiser.cx>
Tue, 10 Jan 2023 20:56:26 +0000 (21:56 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 17 Jan 2023 18:36:14 +0000 (19:36 +0100)
commitf4f52873a1a8b40dcfbae5fd8c35e74cc6f46ae9
treeca4a7580eecde1f93a44413bfab37258c41ebc5d
parent8db002ed48ae8d1821592f1c34d88a39294839b1
staging: r8188eu: always process urb status

Remove the if clause in usb_write_port_complete and process the urb
status regardless of bSurpriseRemoved, bDriverStopped and
bWritePortCancel.

The only possible results of urb status processing are updates to
bSurpriseRemoved and bDriverStopped. All of the three status variable are
set to true only if the whole USB processing has to be stopped (when the
driver is unloaded or when the system goes to sleep).

It's no problem if one of the "stop everything" variables is already set
and the urb status processing sets another one.

This patch removes the last goto in usb_write_port_complete. It's also
part of the ongoing effort to limit the use of the "stop everything"
variables.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Link: https://lore.kernel.org/r/20230110205626.183516-5-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/os_dep/usb_ops_linux.c