Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 498879b8 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "cnss2: Avoid dereferencing pointer before NULL check"

parents 185f5e9c 0bb0ef6e
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -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);
}