All of lore.kernel.org
 help / color / mirror / Atom feed
From: 'Wei Yongjun <weiyongjun1@huawei.com>
To: weiyongjun1@huawei.com,
	"Nicolas Saenz Julienne" <nsaenzjulienne@suse.de>,
	"Lorenzo Pieralisi" <lorenzo.pieralisi@arm.com>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	"Florian Fainelli" <f.fainelli@gmail.com>,
	bcm-kernel-feedback-list@broadcom.com,
	"Philipp Zabel" <p.zabel@pengutronix.de>,
	"Rafał Miłecki" <rafal@milecki.pl>
Cc: <linux-rpi-kernel@lists.infradead.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-pci@vger.kernel.org>, <kernel-janitors@vger.kernel.org>,
	Hulk Robot <hulkci@huawei.com>
Subject: [PATCH -next] PCI: brcmstb: Fix error return code in brcm_pcie_probe()
Date: Mon, 8 Mar 2021 13:56:19 +0000	[thread overview]
Message-ID: <20210308135619.19133-1-weiyongjun1@huawei.com> (raw)

From: Wei Yongjun <weiyongjun1@huawei.com>

Fix to return negative error code -ENODEV from the unsupported revision
error handling case instead of 0, as done elsewhere in this function.

Fixes: 0cdfaceb9889 ("PCI: brcmstb: support BCM4908 with external PERST# signal controller")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/pci/controller/pcie-brcmstb.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/pci/controller/pcie-brcmstb.c b/drivers/pci/controller/pcie-brcmstb.c
index e330e6811f0b..69c999222cc8 100644
--- a/drivers/pci/controller/pcie-brcmstb.c
+++ b/drivers/pci/controller/pcie-brcmstb.c
@@ -1296,6 +1296,7 @@ static int brcm_pcie_probe(struct platform_device *pdev)
 	pcie->hw_rev = readl(pcie->base + PCIE_MISC_REVISION);
 	if (pcie->type == BCM4908 && pcie->hw_rev >= BRCM_PCIE_HW_REV_3_20) {
 		dev_err(pcie->dev, "hardware revision with unsupported PERST# setup\n");
+		ret = -ENODEV;
 		goto fail;
 	}
 


WARNING: multiple messages have this Message-ID (diff)
From: 'Wei Yongjun <weiyongjun1@huawei.com>
To: weiyongjun1@huawei.com,
	"Nicolas Saenz Julienne" <nsaenzjulienne@suse.de>,
	"Lorenzo Pieralisi" <lorenzo.pieralisi@arm.com>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	"Florian Fainelli" <f.fainelli@gmail.com>,
	bcm-kernel-feedback-list@broadcom.com,
	"Philipp Zabel" <p.zabel@pengutronix.de>,
	"Rafał Miłecki" <rafal@milecki.pl>
Cc: <linux-rpi-kernel@lists.infradead.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-pci@vger.kernel.org>, <kernel-janitors@vger.kernel.org>,
	Hulk Robot <hulkci@huawei.com>
Subject: [PATCH -next] PCI: brcmstb: Fix error return code in brcm_pcie_probe()
Date: Mon, 8 Mar 2021 13:56:19 +0000	[thread overview]
Message-ID: <20210308135619.19133-1-weiyongjun1@huawei.com> (raw)

From: Wei Yongjun <weiyongjun1@huawei.com>

Fix to return negative error code -ENODEV from the unsupported revision
error handling case instead of 0, as done elsewhere in this function.

Fixes: 0cdfaceb9889 ("PCI: brcmstb: support BCM4908 with external PERST# signal controller")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/pci/controller/pcie-brcmstb.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/pci/controller/pcie-brcmstb.c b/drivers/pci/controller/pcie-brcmstb.c
index e330e6811f0b..69c999222cc8 100644
--- a/drivers/pci/controller/pcie-brcmstb.c
+++ b/drivers/pci/controller/pcie-brcmstb.c
@@ -1296,6 +1296,7 @@ static int brcm_pcie_probe(struct platform_device *pdev)
 	pcie->hw_rev = readl(pcie->base + PCIE_MISC_REVISION);
 	if (pcie->type == BCM4908 && pcie->hw_rev >= BRCM_PCIE_HW_REV_3_20) {
 		dev_err(pcie->dev, "hardware revision with unsupported PERST# setup\n");
+		ret = -ENODEV;
 		goto fail;
 	}
 


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

             reply	other threads:[~2021-03-08 13:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-08 13:56 'Wei Yongjun [this message]
2021-03-08 13:56 ` [PATCH -next] PCI: brcmstb: Fix error return code in brcm_pcie_probe() 'Wei Yongjun
2021-03-08 14:49 ` Krzysztof Wilczyński
2021-03-08 14:49   ` Krzysztof Wilczyński
2021-03-08 16:34 ` Florian Fainelli
2021-03-08 16:34   ` Florian Fainelli
2021-03-22 17:50 ` Lorenzo Pieralisi
2021-03-22 17:50   ` Lorenzo Pieralisi

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=20210308135619.19133-1-weiyongjun1@huawei.com \
    --to=weiyongjun1@huawei.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=bhelgaas@google.com \
    --cc=f.fainelli@gmail.com \
    --cc=hulkci@huawei.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-rpi-kernel@lists.infradead.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=nsaenzjulienne@suse.de \
    --cc=p.zabel@pengutronix.de \
    --cc=rafal@milecki.pl \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.