mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 16:16:15 -04:00
qcacld-3.0: Correct the logic that checks bound for pmo handler ids
Under unregistering of PMO handlers, incoming component id is sanity checked. In the logic, WLAN_UMAC_MAX_COMPONENTS as id will not cause failure even though it is an id beyond the acceptable bound. Correct the logic so that WLAN_UMAC_MAX_COMPONENTS ends up in failure. Change-Id: I6935f34c6d91a4217c3f7f73cd5539af2741ed2b CRs-Fixed: 2091831
This commit is contained in:
parent
e807596178
commit
da14496747
1 changed files with 2 additions and 2 deletions
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2017 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2018 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
|
|
@ -370,7 +370,7 @@ QDF_STATUS pmo_unregister_suspend_handler(
|
|||
goto out;
|
||||
}
|
||||
|
||||
if (id > WLAN_UMAC_MAX_COMPONENTS || id < 0) {
|
||||
if (id >= WLAN_UMAC_MAX_COMPONENTS || id < 0) {
|
||||
pmo_err("component id: %d is %s then valid components id",
|
||||
id, id < 0 ? "Less" : "More");
|
||||
status = QDF_STATUS_E_FAILURE;
|
||||
|
|
|
|||
Loading…
Reference in a new issue