* [PATCH] iio: Fix missing unlock on duplicate trigger
@ 2016-06-28 14:12 Crestez Dan Leonard
0 siblings, 0 replies; only message in thread
From: Crestez Dan Leonard @ 2016-06-28 14:12 UTC (permalink / raw)
To: Jonathan Cameron, linux-iio
Cc: linux-kernel, Hartmut Knaack, Lars-Peter Clausen,
Peter Meerwald-Stadler, Daniel Baluta, Crestez Dan Leonard
Since duplicate trigger names are supposed to cause errors at probe time
anyway this issue is unlikely to affect anyone.
Fixes commit 2e2b6a13f5f5119c36551c1ab99b85e0ad1a2105:
iio: Refuse to register triggers with duplicate names
Signed-off-by: Crestez Dan Leonard <leonard.crestez@intel.com>
---
drivers/iio/industrialio-trigger.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/iio/industrialio-trigger.c b/drivers/iio/industrialio-trigger.c
index 0f03523..68466be 100644
--- a/drivers/iio/industrialio-trigger.c
+++ b/drivers/iio/industrialio-trigger.c
@@ -89,6 +89,7 @@ int iio_trigger_register(struct iio_trigger *trig_info)
/* Add to list of available triggers held by the IIO core */
mutex_lock(&iio_trigger_list_lock);
if (__iio_trigger_find_by_name(trig_info->name)) {
+ mutex_unlock(&iio_trigger_list_lock);
pr_err("Duplicate trigger name '%s'\n", trig_info->name);
ret = -EEXIST;
goto error_device_del;
--
2.7.4
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2016-06-28 14:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-28 14:12 [PATCH] iio: Fix missing unlock on duplicate trigger Crestez Dan Leonard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).