mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 08:07:32 -04:00
qcacmn: Check peer for null before dereference
Check for peer null check before dereference in dp_peer_state_update to update its state. Change-Id: Id3b743d6cbe3d156a48ad111e467579b7478e4bb CRs-Fixed: 1107176
This commit is contained in:
parent
38f05ebf53
commit
6fb389b4e4
1 changed files with 6 additions and 1 deletions
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2016 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2016-2017 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
|
||||
|
|
@ -1021,6 +1021,11 @@ QDF_STATUS dp_peer_state_update(void *pdev_handle, uint8_t *peer_mac,
|
|||
struct dp_pdev *pdev = pdev_handle;
|
||||
|
||||
peer = dp_peer_find_hash_find(pdev->soc, peer_mac, 0);
|
||||
if (NULL == peer) {
|
||||
QDF_TRACE(QDF_MODULE_ID_TXRX, QDF_TRACE_LEVEL_ERROR,
|
||||
"Failed to find peer for: [%pM]", peer_mac);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
peer->state = state;
|
||||
DP_TRACE(INFO, "peer %p state %d",
|
||||
peer, peer->state);
|
||||
|
|
|
|||
Loading…
Reference in a new issue