diff options
author | Jiri Slaby <jslaby@suse.cz> | 2021-06-18 08:15:00 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-06-18 13:10:02 +0200 |
commit | 987a4cfee5765c9d7242a81d2f90e1429c83201b (patch) | |
tree | 24745196863035505d0b0e4716d52966e784386b /drivers/tty | |
parent | ad1c92ff6ee948584603ef2e004704cfceb899a4 (diff) |
mxser: remove pointless ioaddr checks
struct mxser_port::ioaddr can never be NULL once set in ->probe. Hence
the checks for it are pointless. Remove them.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Link: https://lore.kernel.org/r/20210618061516.662-55-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/mxser.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/tty/mxser.c b/drivers/tty/mxser.c index 81e2b72fca3f..e5f8d08de8fd 100644 --- a/drivers/tty/mxser.c +++ b/drivers/tty/mxser.c @@ -446,9 +446,6 @@ static int mxser_set_baud(struct tty_struct *tty, speed_t newspd) unsigned char cval; u64 timeout; - if (!info->ioaddr) - return -1; - if (newspd > info->board->max_baud) return -1; @@ -519,8 +516,6 @@ static void mxser_change_speed(struct tty_struct *tty) unsigned char status; cflag = tty->termios.c_cflag; - if (!info->ioaddr) - return; mxser_set_baud(tty, tty_get_baud_rate(tty)); @@ -724,7 +719,7 @@ static int mxser_activate(struct tty_port *port, struct tty_struct *tty) spin_lock_irqsave(&info->slock, flags); - if (!info->ioaddr || !info->type) { + if (!info->type) { set_bit(TTY_IO_ERROR, &tty->flags); free_page(page); spin_unlock_irqrestore(&info->slock, flags); @@ -1097,10 +1092,6 @@ static int mxser_set_serial_info(struct tty_struct *tty, return -EIO; mutex_lock(&port->mutex); - if (!info->ioaddr) { - mutex_unlock(&port->mutex); - return -ENODEV; - } if (ss->irq != info->board->irq || ss->port != info->ioaddr) { |