From: mchehab@infradead.org
To: linux-kernel@vger.kernel.org
Cc: linux-dvb-maintainer@linuxtv.org,
Ira Snyder <kernel@irasnyder.com>,
"Ira W. Snyder" <devel@irasnyder.com>,
"Hans J. Koch" <koch@hjk-az.de>,
Mauro Carvalho Chehab <mchehab@infradead.org>
Subject: [PATCH 4/5] V4L/DVB (4849): Add missing spin_unlock to saa6588 decoder driver
Date: Tue, 21 Nov 2006 10:38:50 -0200 [thread overview]
Message-ID: <20061121123850.PS5395860004@infradead.org> (raw)
In-Reply-To: <20061121123202.PS8610150000@infradead.org>
From: Ira Snyder <kernel@irasnyder.com>
Sparse noticed a lock imbalance in read_from_buf(). Further inspection shows
that the lock should not be held when the function exits.
This adds a spin_unlock_irqrestore(), so that every exit path of the
read_from_buf() function is consistent. The unlock was missing on an error
path.
Signed-off-by: Ira W. Snyder <devel@irasnyder.com>
Signed-off-by: Hans J. Koch <koch@hjk-az.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
---
drivers/media/video/saa6588.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/media/video/saa6588.c b/drivers/media/video/saa6588.c
index a81285c..7b9859c 100644
--- a/drivers/media/video/saa6588.c
+++ b/drivers/media/video/saa6588.c
@@ -212,8 +212,10 @@ static void read_from_buf(struct saa6588
if (rd_blocks > s->block_count)
rd_blocks = s->block_count;
- if (!rd_blocks)
+ if (!rd_blocks) {
+ spin_unlock_irqrestore(&s->lock, flags);
return;
+ }
for (i = 0; i < rd_blocks; i++) {
if (block_to_user_buf(s, buf_ptr)) {
prev parent reply other threads:[~2006-11-21 12:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-21 12:32 [PATCH 0/5] V4L/DVB bug fixes mchehab
2006-11-21 12:38 ` [PATCH 5/5] V4L/DVB (4865): Fix: Slot 0 not NULL on disconnecting SN9C10x PC Camera mchehab
2006-11-21 12:38 ` [PATCH 2/5] V4L/DVB (4840): Budget: diseqc_method module parameter for cards with subsystem-id 13c2:1003 mchehab
2006-11-21 12:38 ` [PATCH 3/5] V4L/DVB (4832): Fix uninitialised variable in dvb_frontend_swzigzag mchehab
2006-11-21 12:38 ` [PATCH 1/5] V4L/DVB (4831): Fix tuning on older budget DVBS cards mchehab
2006-11-21 12:38 ` mchehab [this message]
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=20061121123850.PS5395860004@infradead.org \
--to=mchehab@infradead.org \
--cc=devel@irasnyder.com \
--cc=kernel@irasnyder.com \
--cc=koch@hjk-az.de \
--cc=linux-dvb-maintainer@linuxtv.org \
--cc=linux-kernel@vger.kernel.org \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®