[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <laghliul4hk7lqzkt6i4ddnvfhyq7q5esgdzx24h5vaougtner@5wcboaak2cxy>
Date: Mon, 9 Dec 2024 16:56:57 +0530
From: Siddharth Vadapalli <s-vadapalli@...com>
To: Thomas Richard <thomas.richard@...tlin.com>
CC: <vigneshr@...com>, <s-vadapalli@...com>, <lpieralisi@...nel.org>,
<kw@...ux.com>, <manivannan.sadhasivam@...aro.org>, <robh@...nel.org>,
<bhelgaas@...gle.com>, <theo.lebrun@...tlin.com>,
<thomas.petazzoni@...tlin.com>, <kwilczynski@...nel.org>,
<linux-omap@...r.kernel.org>, <linux-pci@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>, <linux-kernel@...r.kernel.org>,
<gregory.clement@...tlin.com>, <u-kumar1@...com>
Subject: Re: [PATCH] PCI: j721e: In j721e_pcie_suspend_noirq() check
reset_gpio before to use it
On Mon, Dec 09, 2024 at 12:23:21PM +0100, Thomas Richard wrote:
> The reset_gpio is optional, so in j721e_pcie_suspend_noirq() check if it is
> not NULL before to use it.
>
> Fixes: c538d40f365b ("PCI: j721e: Add suspend and resume support")
> Signed-off-by: Thomas Richard <thomas.richard@...tlin.com>
Reviewed-by: Siddharth Vadapalli <s-vadapalli@...com>
> ---
> drivers/pci/controller/cadence/pci-j721e.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/pci/controller/cadence/pci-j721e.c b/drivers/pci/controller/cadence/pci-j721e.c
> index 0341d51d6aed..5bc14dd70811 100644
> --- a/drivers/pci/controller/cadence/pci-j721e.c
> +++ b/drivers/pci/controller/cadence/pci-j721e.c
> @@ -644,7 +644,9 @@ static int j721e_pcie_suspend_noirq(struct device *dev)
> struct j721e_pcie *pcie = dev_get_drvdata(dev);
>
> if (pcie->mode == PCI_MODE_RC) {
> - gpiod_set_value_cansleep(pcie->reset_gpio, 0);
> + if (pcie->reset_gpio)
> + gpiod_set_value_cansleep(pcie->reset_gpio, 0);
> +
> clk_disable_unprepare(pcie->refclk);
> }
>
Regards,
Siddharth.
Powered by blists - more mailing lists