mxser: simplify mxser_ioctl_op_mode
authorJiri Slaby <jslaby@suse.cz>
Fri, 18 Jun 2021 06:14:45 +0000 (08:14 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 18 Jun 2021 11:10:01 +0000 (13:10 +0200)
commit238d117d17516f92f5db958809ddec30731e9342
tree37adb9999e9d9f780012dbf768b3050852faab0e
parent9fae5f857e124e843c7a41a04a49b3f9256a2d77
mxser: simplify mxser_ioctl_op_mode

* ModeMask local array is just inverted OP_MODE_MASK shifted by shiftbit.
  Drop this array and use the value directly.
* return from the if's true branch and drop 'else' branch by moving the
  code completely outside the if.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Link: https://lore.kernel.org/r/20210618061516.662-40-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/mxser.c