tty: hvcs: simplify if-if to if-else
Use if and else instead of if(A) and if (!A) and fix a coding style. Signed-off-by: Wan Jiabing <wanjiabing@vivo.com> Link: https://lore.kernel.org/r/20220424091310.98780-1-wanjiabing@vivo.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
f0426b4e3b
commit
3d27b05e41
@@ -581,10 +581,9 @@ static int hvcs_io(struct hvcs_struct *hvcsd)
|
|||||||
|
|
||||||
spin_unlock_irqrestore(&hvcsd->lock, flags);
|
spin_unlock_irqrestore(&hvcsd->lock, flags);
|
||||||
/* This is synch -- FIXME :js: it is not! */
|
/* This is synch -- FIXME :js: it is not! */
|
||||||
if(got)
|
if (got)
|
||||||
tty_flip_buffer_push(&hvcsd->port);
|
tty_flip_buffer_push(&hvcsd->port);
|
||||||
|
else {
|
||||||
if (!got) {
|
|
||||||
/* Do this _after_ the flip_buffer_push */
|
/* Do this _after_ the flip_buffer_push */
|
||||||
spin_lock_irqsave(&hvcsd->lock, flags);
|
spin_lock_irqsave(&hvcsd->lock, flags);
|
||||||
vio_enable_interrupts(hvcsd->vdev);
|
vio_enable_interrupts(hvcsd->vdev);
|
||||||
|
|||||||
Reference in New Issue
Block a user