Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Frank Li <Frank.li@nxp.com>
To: Vincent Guittot <vincent.guittot@linaro.org>
Cc: ciprianmarian.costea@oss.nxp.com, s32@nxp.com,
	lpieralisi@kernel.org, kwilczynski@kernel.org, mani@kernel.org,
	robh@kernel.org, bhelgaas@google.com, imx@lists.linux.dev,
	linux-arm-kernel@lists.infradead.org, linux-pci@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] PCI: s32g: Fix ports parsing
Date: Mon, 2 Feb 2026 12:42:46 -0500	[thread overview]
Message-ID: <aYDiFpGT5hEDDFhV@lizhi-Precision-Tower-5810> (raw)
In-Reply-To: <20260202151050.1446165-1-vincent.guittot@linaro.org>

On Mon, Feb 02, 2026 at 04:10:50PM +0100, Vincent Guittot wrote:
> No error return is missing after the loop resulting in removing the
> ports from the list.
>
> Fixes: 5cbc7d3e316e ("PCI: s32g: Add NXP S32G PCIe controller driver (RC)")
> Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
> ---
>
> Change since v1:
> - handle correctly the case when there is no child port
>
>  drivers/pci/controller/dwc/pcie-nxp-s32g.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/pci/controller/dwc/pcie-nxp-s32g.c b/drivers/pci/controller/dwc/pcie-nxp-s32g.c
> index 47745749f75c..b3ec38099fa3 100644
> --- a/drivers/pci/controller/dwc/pcie-nxp-s32g.c
> +++ b/drivers/pci/controller/dwc/pcie-nxp-s32g.c
> @@ -282,12 +282,12 @@ static int s32g_pcie_parse_ports(struct device *dev, struct s32g_pcie *s32g_pp)
>
>  		ret = s32g_pcie_parse_port(s32g_pp, of_port);
>  		if (ret)
> -			goto err_port;
> +			break;
>  	}
>
> -err_port:
> -	list_for_each_entry_safe(port, tmp, &s32g_pp->ports, list)
> -		list_del(&port->list);

break and goto is logical equal here. So only need below if (ret).

Frank

> +	if (ret)
> +		list_for_each_entry_safe(port, tmp, &s32g_pp->ports, list)
> +			list_del(&port->list);
>
>  	return ret;
>  }
> --
> 2.43.0
>


  reply	other threads:[~2026-02-02 17:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-02 15:10 [PATCH v2] PCI: s32g: Fix ports parsing Vincent Guittot
2026-02-02 17:42 ` Frank Li [this message]
2026-02-02 19:23   ` Vincent Guittot
2026-02-02 19:46     ` Frank Li
2026-02-03  6:56       ` Vincent Guittot
2026-02-03 15:41         ` Frank Li
2026-02-03 12:57 ` Manivannan Sadhasivam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aYDiFpGT5hEDDFhV@lizhi-Precision-Tower-5810 \
    --to=frank.li@nxp.com \
    --cc=bhelgaas@google.com \
    --cc=ciprianmarian.costea@oss.nxp.com \
    --cc=imx@lists.linux.dev \
    --cc=kwilczynski@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=mani@kernel.org \
    --cc=robh@kernel.org \
    --cc=s32@nxp.com \
    --cc=vincent.guittot@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox