diff mbox

[pci/next] PCI: rcar: return ENODEV code when PCIe card does not insert

Message ID 1481889004-26124-1-git-send-email-horms+renesas@verge.net.au
State Accepted
Headers show

Commit Message

Simon Horman Dec. 16, 2016, 11:50 a.m. UTC
From: Harunobu Kurokawa <harunobu.kurokawa.dn@renesas.com>

R-Car PCIe does not support hotplug so it is appropriate to
treat the absence of a PCIe card as an ENODEV error.

Signed-off-by: Harunobu Kurokawa <harunobu.kurokawa.dn@renesas.com>
[simon: updated changelog]
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
 drivers/pci/host/pcie-rcar.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Bjorn Helgaas Jan. 11, 2017, 6:42 p.m. UTC | #1
On Fri, Dec 16, 2016 at 12:50:04PM +0100, Simon Horman wrote:
> From: Harunobu Kurokawa <harunobu.kurokawa.dn@renesas.com>
> 
> R-Car PCIe does not support hotplug so it is appropriate to
> treat the absence of a PCIe card as an ENODEV error.
> 
> Signed-off-by: Harunobu Kurokawa <harunobu.kurokawa.dn@renesas.com>
> [simon: updated changelog]
> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>

Applied to pci/host-rcar for v4.11 with the following changelog (I updated
the summary line):

commit e94888d23736cec51ba851f6e798d0eeb9ef5f41
Author: Harunobu Kurokawa <harunobu.kurokawa.dn@renesas.com>
Date:   Fri Dec 16 12:50:04 2016 +0100

    PCI: rcar: Return -ENODEV from host bridge probe when no card present
    
    R-Car PCIe does not support hotplug so it is appropriate to treat the
    absence of a PCIe card as an -ENODEV error.
    
    Signed-off-by: Harunobu Kurokawa <harunobu.kurokawa.dn@renesas.com>
    [simon: updated changelog]
    Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
    Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/pci/host/pcie-rcar.c b/drivers/pci/host/pcie-rcar.c
index aca85be101f8..0d9b96c3c49d 100644
--- a/drivers/pci/host/pcie-rcar.c
+++ b/drivers/pci/host/pcie-rcar.c
@@ -1165,7 +1165,7 @@  static int rcar_pcie_probe(struct platform_device *pdev)
 	err = hw_init_fn(pcie);
 	if (err) {
 		dev_info(dev, "PCIe link down\n");
-		err = 0;
+		err = -ENODEV;
 		goto err_pm_put;
 	}