Move the assignment out of hvcsd->port.count from within the if () block so this patch fixes it. It is bad practice to have assignments within an if () block.
Signed-off-by: Bryant G. Ly <bryan...@linux.vnet.ibm.com> --- drivers/tty/hvc/hvcs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/tty/hvc/hvcs.c b/drivers/tty/hvc/hvcs.c index 1db1d97..333dc76 100644 --- a/drivers/tty/hvc/hvcs.c +++ b/drivers/tty/hvc/hvcs.c @@ -1202,7 +1202,8 @@ static void hvcs_close(struct tty_struct *tty, struct file *filp) hvcsd = tty->driver_data; spin_lock_irqsave(&hvcsd->lock, flags); - if (--hvcsd->port.count == 0) { + --hvcsd->port.count; + if (hvcsd->port.count == 0) { vio_disable_interrupts(hvcsd->vdev); -- 2.7.2