lkml.org 
[lkml]   [2016]   [Jun]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] iio: Fix missing unlock on duplicate trigger
Date
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
\
 
 \ /
  Last update: 2016-06-28 17:01    [W:0.583 / U:0.860 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site