serial: 8250_port: Remove useless NULL checks

After switching to HR timers for RS485 the NULL checks for the object
inside timer functions become useless.

Remove them to avoid confusion to static analyzers.

Fixes 6e0a5de213 ("serial: 8250: Use hrtimers for rs485 delays")
Cc: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Andy Shevchenko 2017-08-30 17:12:13 +03:00 committed by Greg Kroah-Hartman
parent 31cb9a8575
commit ae28d7402a
1 changed files with 4 additions and 4 deletions

View File

@ -1450,13 +1450,13 @@ static enum hrtimer_restart serial8250_em485_handle_stop_tx(struct hrtimer *t)
struct uart_8250_em485 *em485; struct uart_8250_em485 *em485;
struct uart_8250_port *p; struct uart_8250_port *p;
unsigned long flags; unsigned long flags;
em485 = container_of(t, struct uart_8250_em485, stop_tx_timer); em485 = container_of(t, struct uart_8250_em485, stop_tx_timer);
p = em485->port; p = em485->port;
serial8250_rpm_get(p); serial8250_rpm_get(p);
spin_lock_irqsave(&p->port.lock, flags); spin_lock_irqsave(&p->port.lock, flags);
if (em485 && if (em485->active_timer == &em485->stop_tx_timer) {
em485->active_timer == &em485->stop_tx_timer) {
__do_stop_tx_rs485(p); __do_stop_tx_rs485(p);
em485->active_timer = NULL; em485->active_timer = NULL;
} }
@ -1608,12 +1608,12 @@ static enum hrtimer_restart serial8250_em485_handle_start_tx(struct hrtimer *t)
struct uart_8250_em485 *em485; struct uart_8250_em485 *em485;
struct uart_8250_port *p; struct uart_8250_port *p;
unsigned long flags; unsigned long flags;
em485 = container_of(t, struct uart_8250_em485, start_tx_timer); em485 = container_of(t, struct uart_8250_em485, start_tx_timer);
p = em485->port; p = em485->port;
spin_lock_irqsave(&p->port.lock, flags); spin_lock_irqsave(&p->port.lock, flags);
if (em485 && if (em485->active_timer == &em485->start_tx_timer) {
em485->active_timer == &em485->start_tx_timer) {
__start_tx(&p->port); __start_tx(&p->port);
em485->active_timer = NULL; em485->active_timer = NULL;
} }