[-next,3/3] media/IR/imon: potential double unlock on error

Message ID 20100504113634.GT29093@bicker (mailing list archive)
State Superseded, archived
Headers

Commit Message

Dan Carpenter May 4, 2010, 11:36 a.m. UTC
  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>

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
  

Comments

Jarod Wilson May 4, 2010, 1:57 p.m. UTC | #1
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>
  

Patch

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;