Commit 245dc23d authored by Christian Gromm's avatar Christian Gromm Committed by Greg Kroah-Hartman

staging: most: move mutex

This patch removes mutex from code that doesn't need any locking.
Signed-off-by: default avatarChristian Gromm <christian.gromm@microchip.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 42e252a6
...@@ -1830,15 +1830,14 @@ void most_deregister_interface(struct most_interface *iface) ...@@ -1830,15 +1830,14 @@ void most_deregister_interface(struct most_interface *iface)
struct most_inst_obj *i = iface->priv; struct most_inst_obj *i = iface->priv;
struct most_c_obj *c; struct most_c_obj *c;
mutex_lock(&deregister_mutex);
if (unlikely(!i)) { if (unlikely(!i)) {
pr_info("Bad Interface\n"); pr_info("Bad Interface\n");
mutex_unlock(&deregister_mutex);
return; return;
} }
pr_info("deregistering MOST device %s (%s)\n", i->kobj.name, pr_info("deregistering MOST device %s (%s)\n", i->kobj.name,
iface->description); iface->description);
mutex_lock(&deregister_mutex);
atomic_set(&i->tainted, 1); atomic_set(&i->tainted, 1);
mutex_unlock(&deregister_mutex); mutex_unlock(&deregister_mutex);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment