summaryrefslogtreecommitdiff
path: root/drivers/staging/most
diff options
context:
space:
mode:
authorChristian Gromm <christian.gromm@microchip.com>2015-12-22 09:52:54 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-02-08 01:34:58 (GMT)
commit245dc23d2368beada77d9bc26f3292fa34931655 (patch)
treee8c9bfb76280c6d37efc08bd230b651f27acc270 /drivers/staging/most
parent42e252a65d3bbd36106b3e243cb1e11136cecdf4 (diff)
downloadlinux-245dc23d2368beada77d9bc26f3292fa34931655.tar.xz
staging: most: move mutex
This patch removes mutex from code that doesn't need any locking. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/most')
-rw-r--r--drivers/staging/most/mostcore/core.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/most/mostcore/core.c b/drivers/staging/most/mostcore/core.c
index 21c550c..ae1b577 100644
--- a/drivers/staging/most/mostcore/core.c
+++ b/drivers/staging/most/mostcore/core.c
@@ -1830,15 +1830,14 @@ void most_deregister_interface(struct most_interface *iface)
struct most_inst_obj *i = iface->priv;
struct most_c_obj *c;
- mutex_lock(&deregister_mutex);
if (unlikely(!i)) {
pr_info("Bad Interface\n");
- mutex_unlock(&deregister_mutex);
return;
}
pr_info("deregistering MOST device %s (%s)\n", i->kobj.name,
iface->description);
+ mutex_lock(&deregister_mutex);
atomic_set(&i->tainted, 1);
mutex_unlock(&deregister_mutex);