mirror of
https://github.com/LineageOS/android_kernel_samsung_msm8226.git
synced 2026-09-28 00:00:22 +02:00
Bluetooth: Validate HCI device handle before updating scan state
Check if the HCI device handle is available prior to updating the scan state. Change-Id: Ifc278afecbcf2bc7a95bb6595028dd890a8b60f5 CRs-Fixed: 436733 Signed-off-by: Anantha Krishnan <ananthk@codeaurora.org>
This commit is contained in:
committed by
Jay Chokshi
parent
9498f5e6ea
commit
91b11ffac9
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
BlueZ - Bluetooth protocol stack for Linux
|
||||
Copyright (C) 2010 Nokia Corporation
|
||||
Copyright (c) 2011-2012 The Linux Foundation. All rights reserved.
|
||||
Copyright (c) 2011-2013 The Linux Foundation. All rights reserved.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License version 2 as
|
||||
@@ -2238,10 +2238,11 @@ void mgmt_inquiry_complete_evt(u16 index, u8 status)
|
||||
|
||||
mgmt_event(MGMT_EV_DISCOVERING, index, &cp, sizeof(cp), NULL);
|
||||
|
||||
hdev->disco_state = SCAN_IDLE;
|
||||
|
||||
if (hdev)
|
||||
if (hdev) {
|
||||
BT_DBG("Setting state to SCAN_IDLE\n");
|
||||
hdev->disco_state = SCAN_IDLE;
|
||||
goto done;
|
||||
}
|
||||
else
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user