Skip to content

Commit

Permalink
[media] rc: unlock on error in store_protocols()
Browse files Browse the repository at this point in the history
This error path is missing the unlock.

[mchehab@redhat.com: Merged two equal patches into one]
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Acked-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Dan Carpenter authored and Mauro Carvalho Chehab committed Dec 27, 2012
1 parent a44dca1 commit afe5624
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/media/rc/rc-main.c
Original file line number Diff line number Diff line change
Expand Up @@ -892,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++;
Expand Down

0 comments on commit afe5624

Please sign in to comment.