diff options
| author | Jiri Slaby (SUSE) <jirislaby@kernel.org> | 2025-11-19 11:01:39 +0100 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-11-21 18:30:40 +0100 |
| commit | f374a33e90e6cc17b05629636e68a012dc8347ed (patch) | |
| tree | e064787e1e8faa1af8c6a43029b9bcd1a7ff002b /rust/helpers/usb.c | |
| parent | dee7e10498c76490bb3bd5039c7c12d54585c26d (diff) | |
serial: serial_core: simplify uart_ioctl() returns
Neither uart_do_autoconfig(), nor uart_wait_modem_status() can return
-ENOIOCTLCMD. The ENOIOCTLCMD checks are there to check if 'cmd' matched
against TIOCSERCONFIG, and TIOCMIWAIT respectively. (With 0 or error in
'ret', it does not matter.)
Therefore, the code can simply return from the TIOCSERCONFIG and
TIOCMIWAIT spots immediately.
To be more explicit, use 'if' instead of switch-case for those single
values.
And return without jumping to the 'out' label -- it can be removed too.
Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
Link: https://patch.msgid.link/20251119100140.830761-10-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'rust/helpers/usb.c')
0 files changed, 0 insertions, 0 deletions
