mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 04:12:04 -04:00
cnss2: Avoid dereferencing pointer before NULL check
Only dereference pci_priv pointer after NULL check. Change-Id: I773cb4ae07599b737391ced3e67e4b1ad177b4f1 Signed-off-by: Yue Ma <yuem@codeaurora.org>
This commit is contained in:
parent
76a04e42a5
commit
0bb0ef6ed8
1 changed files with 2 additions and 3 deletions
|
|
@ -4401,17 +4401,16 @@ static void cnss_dev_rddm_timeout_hdlr(struct timer_list *t)
|
|||
{
|
||||
struct cnss_pci_data *pci_priv =
|
||||
from_timer(pci_priv, t, dev_rddm_timer);
|
||||
struct mhi_controller *mhi_ctrl = pci_priv->mhi_ctrl;
|
||||
|
||||
if (!pci_priv)
|
||||
return;
|
||||
|
||||
cnss_fatal_err("Timeout waiting for RDDM notification\n");
|
||||
|
||||
if (mhi_get_exec_env(mhi_ctrl) == MHI_EE_PBL)
|
||||
if (mhi_get_exec_env(pci_priv->mhi_ctrl) == MHI_EE_PBL)
|
||||
cnss_pr_err("Unable to collect ramdumps due to abrupt reset\n");
|
||||
|
||||
mhi_debug_reg_dump(mhi_ctrl);
|
||||
mhi_debug_reg_dump(pci_priv->mhi_ctrl);
|
||||
|
||||
cnss_schedule_recovery(&pci_priv->pci_dev->dev, CNSS_REASON_TIMEOUT);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue