On Tue, Oct 25, 2016 at 02:42:51PM +0100, Srinivas Kandagatla wrote: > get_resources() will dereference dev as NULL pointer when called from probe(), > as pp.dev is only assigned after get_resources() is called. > > Fix this by moving dev pointer assignment before get_resources() call. > > Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@xxxxxxxxxx> > Fixes: e6a087eeaf91 ("PCI: qcom: Remove redundant struct qcom_pcie.dev") Applied to for-linus for v4.9, thanks, Srinivas. Sorry for the breakage. > --- > drivers/pci/host/pcie-qcom.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/pci/host/pcie-qcom.c b/drivers/pci/host/pcie-qcom.c > index ef0a84c..3593640 100644 > --- a/drivers/pci/host/pcie-qcom.c > +++ b/drivers/pci/host/pcie-qcom.c > @@ -533,11 +533,11 @@ static int qcom_pcie_probe(struct platform_device *pdev) > if (IS_ERR(pcie->phy)) > return PTR_ERR(pcie->phy); > > + pp->dev = dev; > ret = pcie->ops->get_resources(pcie); > if (ret) > return ret; > > - pp->dev = dev; > pp->root_bus_nr = -1; > pp->ops = &qcom_pcie_dw_ops; > > -- > 2.10.1 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-pci" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html