lkml.org 
[lkml]   [2018]   [Jul]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [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@nxp.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().

\
 
 \ /
  Last update: 2018-07-20 15:39    [W:0.107 / U:1.940 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site