LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Jiri Slaby <jirislaby@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, Jiri Slaby <jirislaby@gmail.com>
Subject: [PATCH 3/4] Char: ip2, fix sparse warnings
Date: Fri, 28 Mar 2008 22:18:43 +0100	[thread overview]
Message-ID: <1206739124-3875-3-git-send-email-jirislaby@gmail.com> (raw)
In-Reply-To: <20080328032449.cbc09f3b.akpm@linux-foundation.org>

Unlock two grabbed locks on some paths.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
---
 drivers/char/ip2/i2lib.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/char/ip2/i2lib.c b/drivers/char/ip2/i2lib.c
index 618f5fe..1d5388c 100644
--- a/drivers/char/ip2/i2lib.c
+++ b/drivers/char/ip2/i2lib.c
@@ -643,12 +643,12 @@ i2QueueCommands(int type, i2ChanStrPtr pCh, int timeout, int nCommands,
 				// Normal Expected path - We still hold LOCK
 				break; /* from for()- Enough room: goto proceed */
 			}
-		}
-
-		ip2trace (CHANN, ITRC_QUEUE, 3, 1, totalsize );
+			ip2trace(CHANN, ITRC_QUEUE, 3, 1, totalsize);
+			write_unlock_irqrestore(lock_var_p, flags);
+		} else
+			ip2trace(CHANN, ITRC_QUEUE, 3, 1, totalsize);
 
 		// Prepare to wait for buffers to empty
-		write_unlock_irqrestore(lock_var_p, flags);
 		serviceOutgoingFifo(pB);	// Dump what we got
 
 		if (timeout == 0) {
@@ -1834,6 +1834,8 @@ i2StripFifo(i2eBordStrPtr pB)
 		default: // Neither packet? should be impossible
 			ip2trace (ITRC_NO_PORT, ITRC_SFIFO, 5, 1,
 				PTYPE_OF(pB->i2eLeadoffWord) );
+			write_unlock_irqrestore(&pB->read_fifo_spinlock,
+					bflags);
 
 			break;
 		}  // End of switch on type of packets
-- 
1.5.4.4


  parent reply	other threads:[~2008-03-28 21:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20080328032449.cbc09f3b.akpm@linux-foundation.org>
2008-03-28 21:18 ` [PATCH 1/4] Char: rio, fix cirrus defines Jiri Slaby
2008-03-28 21:18 ` [PATCH 2/4] Char: ip2, macros cleanup Jiri Slaby
2008-03-31 21:27   ` Jiri Slaby
2008-04-02 13:15   ` [PATCH 1/1] " Jiri Slaby
2008-03-28 21:18 ` Jiri Slaby [this message]
2008-03-31 23:57   ` [PATCH 3/4] Char: ip2, fix sparse warnings Andrew Morton
2008-04-01  9:53     ` Jiri Slaby
2008-03-28 21:18 ` [PATCH 4/4] Char: rio, " Jiri Slaby
2008-07-05 13:28 [PATCH 1/4] Char: merge ip2main and ip2base Jiri Slaby
2008-07-05 13:28 ` [PATCH 2/4] Char: ip2, cleanup globals Jiri Slaby
2008-07-05 13:28   ` [PATCH 3/4] Char: ip2, fix sparse warnings Jiri Slaby

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1206739124-3875-3-git-send-email-jirislaby@gmail.com \
    --to=jirislaby@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --subject='Re: [PATCH 3/4] Char: ip2, fix sparse warnings' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).