From b22b7104d5930ed4aae2c8494b8f95f20a85d66b Mon Sep 17 00:00:00 2001 From: Viresh Kumar Date: Mon, 29 Feb 2016 12:19:50 +0530 Subject: [PATCH] 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 Reported-by: Laurent Pinchart Signed-off-by: Viresh Kumar Reviewed-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman --- drivers/staging/greybus/hid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/greybus/hid.c b/drivers/staging/greybus/hid.c index 4db337cf7acc..601ee6fc81d5 100644 --- a/drivers/staging/greybus/hid.c +++ b/drivers/staging/greybus/hid.c @@ -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); } -- 2.39.5