1
0
Fork 0
mirror of https://github.com/followmsi/android_kernel_google_msm.git synced 2024-11-06 23:17:41 +00:00

Bluetooth: hidp: use dest address from session info

While hid device unpair process, we are trying to access released
socket as apart of getting hci device which results a kernel panic.

CRs-fixed: 387164
Change-Id: I1f3f3f92cfd1d3b39793bc5a142001d5e26d76c4
Signed-off-by: Ram Mohan Korukonda <rkorukon@codeaurora.org>
This commit is contained in:
Ram Mohan Korukonda 2012-08-09 22:27:01 +05:30 committed by Stephen Boyd
parent f91a28d81a
commit 755dd2aedf

View file

@ -95,12 +95,12 @@ static struct hidp_session *__hidp_get_session(bdaddr_t *bdaddr)
static struct device *hidp_get_device(struct hidp_session *session)
{
bdaddr_t *src = &bt_sk(session->ctrl_sock->sk)->src;
bdaddr_t *dst = &bt_sk(session->ctrl_sock->sk)->dst;
bdaddr_t *dst = &session->bdaddr;
struct device *device = NULL;
struct hci_dev *hdev;
hdev = hci_get_route(dst, src);
hdev = hci_get_route(dst, BDADDR_ANY);
if (!hdev)
return NULL;