linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] HIL: remove one goto
@ 2012-10-31 19:24 Rolf Eike Beer
  2012-11-10  8:47 ` Dmitry Torokhov
  0 siblings, 1 reply; 2+ messages in thread
From: Rolf Eike Beer @ 2012-10-31 19:24 UTC (permalink / raw)
  To: linux-parisc, linux-input

This goto is only used to skip the next instruction, which can easily be done
without a goto.

Signed-off-by: Rolf Eike Beer <eike-kernel@sf-tec.de>
---
 drivers/input/serio/hil_mlc.c |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/input/serio/hil_mlc.c b/drivers/input/serio/hil_mlc.c
index bfd3865..0280167 100644
--- a/drivers/input/serio/hil_mlc.c
+++ b/drivers/input/serio/hil_mlc.c
@@ -686,13 +686,12 @@ static int hilse_donode(hil_mlc *mlc)
 		write_lock_irqsave(&mlc->lock, flags);
 		pack = node->object.packet;
 	out:
-		if (mlc->istarted)
-			goto out2;
-		/* Prepare to receive input */
-		if ((node + 1)->act & HILSE_IN)
-			hilse_setup_input(mlc, node + 1);
+		if (!mlc->istarted) {
+			/* Prepare to receive input */
+			if ((node + 1)->act & HILSE_IN)
+				hilse_setup_input(mlc, node + 1);
+		}
 
-	out2:
 		write_unlock_irqrestore(&mlc->lock, flags);
 
 		if (down_trylock(&mlc->osem)) {
-- 
1.7.7



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] HIL: remove one goto
  2012-10-31 19:24 [PATCH] HIL: remove one goto Rolf Eike Beer
@ 2012-11-10  8:47 ` Dmitry Torokhov
  0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Torokhov @ 2012-11-10  8:47 UTC (permalink / raw)
  To: Rolf Eike Beer; +Cc: linux-parisc, linux-input

On Wed, Oct 31, 2012 at 08:24:34PM +0100, Rolf Eike Beer wrote:
> This goto is only used to skip the next instruction, which can easily be done
> without a goto.
> 
> Signed-off-by: Rolf Eike Beer <eike-kernel@sf-tec.de>

Applied, thank you Rolf.

-- 
Dmitry

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-11-10  8:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-31 19:24 [PATCH] HIL: remove one goto Rolf Eike Beer
2012-11-10  8:47 ` Dmitry Torokhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).