summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2016-02-29 12:19:50 +0530
committerGreg Kroah-Hartman <gregkh@google.com>2016-02-29 14:49:28 -0800
commitb22b7104d5930ed4aae2c8494b8f95f20a85d66b (patch)
tree6eb5601b3628b1d1e8f0bc8dcc3ba6ac7b463b70 /drivers
parent4a8e519902e73c833fb57f69bc194c2274dcdc30 (diff)
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/greybus/hid.c2
1 files changed, 1 insertions, 1 deletions
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);
}