Merge "cnss2: Avoid dereferencing pointer before NULL check"

This commit is contained in:
qctecmdr 2020-09-19 20:35:22 -07:00 • committed by Gerrit - the friendly Code Review server
commit 498879b848

View file

@ -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);
}