Commit d7849bff authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman

greybus: vibrator: fix tear-down race

Do not release the minor number until after the device has been
deregistered.
Signed-off-by: default avatarJohan Hovold <johan@hovoldconsulting.com>
Reviewed-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent 4c9e2284
......@@ -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);
}
......
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