public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* [patch -next 3/3] media/IR/imon: potential double unlock on error
@ 2010-05-04 11:36 Dan Carpenter
  2010-05-04 13:57 ` Jarod Wilson
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2010-05-04 11:36 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: Jarod Wilson, linux-media

If there is an error here we should unlock in the caller (which is
imon_init_intf1()).  We can remove this stray unlock. 

Signed-off-by: Dan Carpenter <error27@gmail.com>

diff --git a/drivers/media/IR/imon.c b/drivers/media/IR/imon.c
index b65c31a..d48ad6d 100644
--- a/drivers/media/IR/imon.c
+++ b/drivers/media/IR/imon.c
@@ -1777,7 +1777,6 @@ static struct input_dev *imon_init_touch(struct imon_context *ictx)
 
 touch_register_failed:
 	input_free_device(ictx->touch);
-	mutex_unlock(&ictx->lock);
 
 touch_alloc_failed:
 	return NULL;

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

* Re: [patch -next 3/3] media/IR/imon: potential double unlock on error
  2010-05-04 11:36 [patch -next 3/3] media/IR/imon: potential double unlock on error Dan Carpenter
@ 2010-05-04 13:57 ` Jarod Wilson
  0 siblings, 0 replies; 2+ messages in thread
From: Jarod Wilson @ 2010-05-04 13:57 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: Mauro Carvalho Chehab, Jarod Wilson, linux-media

On Tue, May 4, 2010 at 7:36 AM, Dan Carpenter <error27@gmail.com> wrote:
> If there is an error here we should unlock in the caller (which is
> imon_init_intf1()).  We can remove this stray unlock.
>
> Signed-off-by: Dan Carpenter <error27@gmail.com>

Good catch, missed that when doing some heavy refactoring a while back
(haven't got a touch-capable device to have tripped over this either,
the cases with those in them are insanely expensive...)

Acked-by: Jarod Wilson <jarod@redhat.com>

-- 
Jarod Wilson
jarod@wilsonet.com

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

end of thread, other threads:[~2010-05-04 13:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-04 11:36 [patch -next 3/3] media/IR/imon: potential double unlock on error Dan Carpenter
2010-05-04 13:57 ` Jarod Wilson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox