Re: [PATCH v9 2/8] PCI: imx6: Add the error propagation from host_init

From: Bjorn Helgaas
Date: Wed Jun 08 2022 - 14:53:39 EST


On Fri, May 06, 2022 at 09:47:03AM +0800, Richard Zhu wrote:
> Since there is error return check of the host_init callback, add error
> check to imx6_pcie_deassert_core_reset() function, and change the
> function type accordingly.

> @@ -878,11 +879,18 @@ static int imx6_pcie_start_link(struct dw_pcie *pci)
> static int imx6_pcie_host_init(struct pcie_port *pp)
> {
> struct dw_pcie *pci = to_dw_pcie_from_pp(pp);
> + struct device *dev = pci->dev;
> struct imx6_pcie *imx6_pcie = to_imx6_pcie(pci);
> + int ret;
>
> imx6_pcie_assert_core_reset(imx6_pcie);
> imx6_pcie_init_phy(imx6_pcie);
> - imx6_pcie_deassert_core_reset(imx6_pcie);
> + ret = imx6_pcie_deassert_core_reset(imx6_pcie);
> + if (ret < 0) {
> + dev_err(dev, "pcie host init failed: %d.\n", ret);

Other messages from this driver do not include a trailing period.