From: Dan Carpenter Date: Tue, 27 Nov 2012 16:35:30 +0000 (-0300) Subject: [media] rc: unlock on error in store_protocols() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=afe5624b142279c6072ce1872811e309ad7e94be;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git [media] rc: unlock on error in store_protocols() This error path is missing the unlock. [mchehab@redhat.com: Merged two equal patches into one] Signed-off-by: Sasha Levin Acked-by: David Härdeman Signed-off-by: Dan Carpenter Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c index d593bc65b4ca..759a40a42eaa 100644 --- a/drivers/media/rc/rc-main.c +++ b/drivers/media/rc/rc-main.c @@ -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++;