All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch 2/2] [media] rc: unlock on error in store_protocols()
@ 2012-11-27 17:35 ` Dan Carpenter
  0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2012-11-27 17:35 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Douglas Bagnall, David Härdeman, Jarod Wilson,
	Ezequiel Garcia, linux-media, kernel-janitors

This error path is missing the unlock.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c
index 601d1ac1..759a40a 100644
--- a/drivers/media/rc/rc-main.c
+++ b/drivers/media/rc/rc-main.c
@@ -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++;

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [patch 2/2] [media] rc: unlock on error in store_protocols()
@ 2012-11-27 17:35 ` Dan Carpenter
  0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2012-11-27 17:35 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Douglas Bagnall, David Härdeman, Jarod Wilson,
	Ezequiel Garcia, linux-media, kernel-janitors

This error path is missing the unlock.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c
index 601d1ac1..759a40a 100644
--- a/drivers/media/rc/rc-main.c
+++ b/drivers/media/rc/rc-main.c
@@ -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++;

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-11-27 17:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-27 17:35 [patch 2/2] [media] rc: unlock on error in store_protocols() Dan Carpenter
2012-11-27 17:35 ` Dan Carpenter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.