Skip to contentSkip to conversation

rc: unlock on error in store_protocols()

PATCH In review Dan Carpenter 1 participant 1 message Nov 27, 2012

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 2/2 rc: unlock on error in store_protocols()

This error path is missing the unlock.

drivers/media/rc/rc-main.c +2 -1
index 601d1ac1..759a40a 100644
@@ -890,7 +892,8 @@ static ssize_t store_protocols(struct device *device,
 
 		if (i = ARRAY_SIZE(proto_names)) {
 			IR_dprintk(1, "Unknown protocol: '%s'\n", tmp);
-			return -EINVAL;
+			ret = -EINVAL;
+			goto out;
 		}
 
 		count++;