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

Commit 5fd602b4 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: pcie: fix potential NULL pointer in AER support"

parents 67e2481d 6e4d8109
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -3494,7 +3494,7 @@ static irqreturn_t handle_aer_irq(int irq, void *data)

	int corr_val, uncorr_val, rc_err_status, ep_corr_val, ep_uncorr_val;
	int i, j, ep_src_bdf;
	void __iomem *ep_base;
	void __iomem *ep_base = NULL;

	PCIE_DBG(dev, "AER Interrupt handler fired for RC%d irq %d\n",
		dev->rc_idx, irq);
@@ -3542,6 +3542,13 @@ static irqreturn_t handle_aer_irq(int irq, void *data)
			}
		}

		if (!ep_base) {
			PCIE_ERR(dev,
				"PCIe: RC%d no endpoint found for reported error\n",
				dev->rc_idx);
			goto out;
		}

		ep_uncorr_val = readl_relaxed(ep_base +
					PCIE20_AER_UNCORR_ERR_STATUS_REG);
		ep_corr_val = readl_relaxed(ep_base +