Skip to contentSkip to conversation

media/IR/imon: potential double unlock on error

PATCH In review Dan Carpenter 2 participants 2 messages May 4, 2010 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 3/3 media/IR/imon: potential double unlock on error

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

drivers/media/IR/imon.c +0 -1
index b65c31a..d48ad6d 100644
@@ -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;
Acked-by on v1 3/3
#1 lore raw
Quoted 4 lines · Dan Carpenter

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

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

Signature · 2 lines
Jarod Wilson
[email protected]