Skip to content
Commit 602c8021 authored by Jiri Slaby's avatar Jiri Slaby Committed by Greg Kroah-Hartman
Browse files

serial: move WARN_ON() in uart_write() to the condition



uart code currently does the following in uart_write() and
uart_flush_buffer():
  if (cond) {
    WARN_ON(1);
    return;
  }

It can be rewritten to more obvious and more readable:
  if (WARN_ON(cond))
    return;

Do so.

Signed-off-by: default avatarJiri Slaby (SUSE) <jirislaby@kernel.org>
Link: https://lore.kernel.org/r/20230731080244.2698-2-jirislaby@kernel.org


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent fe301574
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment