summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorJohan Hovold <johan@hovoldconsulting.com>2015-09-14 20:19:02 +0200
committerGreg Kroah-Hartman <gregkh@google.com>2015-09-14 21:57:25 -0700
commitd7849bffc622b3405ef226364d67bb81af48c152 (patch)
tree4e266a89aa5d39347702f5d54000974936945546 /drivers
parent4c9e228407a25a99876b979479ff76208ab7de47 (diff)
greybus: vibrator: fix tear-down race
Do not release the minor number until after the device has been deregistered. Signed-off-by: Johan Hovold <johan@hovoldconsulting.com> Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/greybus/vibrator.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/greybus/vibrator.c b/drivers/staging/greybus/vibrator.c
index 96d649acf122..fd40cda565e4 100644
--- a/drivers/staging/greybus/vibrator.c
+++ b/drivers/staging/greybus/vibrator.c
@@ -148,8 +148,8 @@ static void gb_vibrator_connection_exit(struct gb_connection *connection)
#if LINUX_VERSION_CODE <= KERNEL_VERSION(3,11,0)
sysfs_remove_group(&vib->dev->kobj, vibrator_groups[0]);
#endif
- ida_simple_remove(&minors, vib->minor);
device_unregister(vib->dev);
+ ida_simple_remove(&minors, vib->minor);
kfree(vib);
}