Bläddra i källkod

cnss2: Do not notify mhi about pcie link down for QCA6174

Do not invoke the mhi_control_error to notify the pcie link down event
for QCA6174 to avoid NULL pointer access.

Change-Id: I2c899ab51117aef2f9474e83217229b211eb4759
CRs-Fixed: 3335555
Tiger Yu 2 år sedan
förälder
incheckning
e6f30383bf
1 ändrade filer med 5 tillägg och 2 borttagningar
  1. 5 2
      cnss2/pci.c

+ 5 - 2
cnss2/pci.c

@@ -1336,8 +1336,11 @@ void cnss_pci_handle_linkdown(struct cnss_pci_data *pci_priv)
 	}
 	pci_priv->pci_link_down_ind = true;
 	spin_unlock_irqrestore(&pci_link_down_lock, flags);
-	/* Notify MHI about link down*/
-	mhi_report_error(pci_priv->mhi_ctrl);
+
+	if (pci_priv->mhi_ctrl) {
+		/* Notify MHI about link down*/
+		mhi_report_error(pci_priv->mhi_ctrl);
+	}
 
 	if (pci_dev->device == QCA6174_DEVICE_ID)
 		disable_irq(pci_dev->irq);