[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOMZO5BQjxeGOUE3jwbA_sRuYWQkHTJo3AeywXXpm-9kVdsYfw@mail.gmail.com>
Date: Fri, 20 Jul 2018 10:38:18 -0300
From: Fabio Estevam <festevam@...il.com>
To: Leonard Crestez <leonard.crestez@....com>
Cc: Lucas Stach <l.stach@...gutronix.de>,
Richard Zhu <hongxing.zhu@....com>,
Andrey Smirnov <andrew.smirnov@...il.com>,
Dong Aisheng <aisheng.dong@....com>,
Joao Pinto <Joao.Pinto@...opsys.com>, linux-pm@...r.kernel.org,
Jingoo Han <jingoohan1@...il.com>,
linux-kernel <linux-kernel@...r.kernel.org>,
Fabio Estevam <fabio.estevam@....com>,
Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
NXP Linux Team <linux-imx@....com>,
Sascha Hauer <kernel@...gutronix.de>,
linux-pci@...r.kernel.org, Bjorn Helgaas <bhelgaas@...gle.com>,
Shawn Guo <shawnguo@...nel.org>,
"moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE"
<linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH v2 3/3] PCI: imx: Initial imx7d pm support
Hi Leonard,
On Fri, Jul 20, 2018 at 9:47 AM, Leonard Crestez
<leonard.crestez@....com> wrote:
> +static int imx6_pcie_resume_noirq(struct device *dev)
> +{
> + int ret = 0;
There is no need for initializing 'ret' here.
> + struct imx6_pcie *imx6_pcie = dev_get_drvdata(dev);
> + struct pcie_port *pp = &imx6_pcie->pci->pp;
> +
> + if (imx6_pcie->variant != IMX7D)
> + return 0;
> +
> + imx6_pcie_assert_core_reset(imx6_pcie);
> + imx6_pcie_init_phy(imx6_pcie);
> + imx6_pcie_deassert_core_reset(imx6_pcie);
> + dw_pcie_setup_rc(pp);
> +
> + ret = imx6_pcie_establish_link(imx6_pcie);
> + if (ret < 0)
> + pr_err("pcie link is down after resume.\n");
Shouldn't the error be propagated?
Also, dev_err() is preferred instead of pr_err().
Powered by blists - more mailing lists