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>
This commit is contained in:
parent
4c9e228407
commit
d7849bffc6
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user