[PATCH] iio: Fix missing unlock on duplicate trigger

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux