mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-01 04:53:09 -04:00
greybus: hid: Don't disable connection-tx before destroying hid-device
hid_destroy_device() can potentially call callbacks defined in struct hid_ll_driver, which may initiate few greybus operations. And so connection (tx) should be kept enabled until the hid-device isn't destroyed. Reported-by: Jiss Kuruvila <jkuruvila@google.com> Reported-by: Laurent Pinchart <laurent.pinchart@linaro.org> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by: Johan Hovold <johan@hovoldconsulting.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
4a8e519902
commit
b22b7104d5
@@ -490,8 +490,8 @@ static void gb_hid_disconnect(struct gb_bundle *bundle)
|
||||
{
|
||||
struct gb_hid *ghid = greybus_get_drvdata(bundle);
|
||||
|
||||
gb_connection_disable(ghid->connection);
|
||||
hid_destroy_device(ghid->hid);
|
||||
gb_connection_disable(ghid->connection);
|
||||
gb_connection_destroy(ghid->connection);
|
||||
kfree(ghid);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user