[RESEND RFC PATCH 1/3] pci: ide: Fix build failure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Suzuki K Poulose <suzuki.poulose@xxxxxxx>
---
 drivers/pci/ide.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/pci/ide.c b/drivers/pci/ide.c
index 0c72985e6a65..f6f4cb71307d 100644
--- a/drivers/pci/ide.c
+++ b/drivers/pci/ide.c
@@ -318,15 +318,16 @@ static struct pci_ide_partner *to_settings(struct pci_dev *pdev, struct pci_ide
 			return NULL;
 		}
 		return &ide->partner[PCI_IDE_EP];
-	case PCI_EXP_TYPE_ROOT_PORT:
+	case PCI_EXP_TYPE_ROOT_PORT: {
 		struct pci_dev *rp = pcie_find_root_port(ide->pdev);
 
-		if (pdev != pcie_find_root_port(ide->pdev)) {
+		if (pdev != rp) {
 			pci_warn_once(pdev, "setup expected Root Port: %s\n",
 				      pci_name(rp));
 			return NULL;
 		}
 		return &ide->partner[PCI_IDE_RP];
+	}
 	default:
 		pci_warn_once(pdev, "invalid device type\n");
 		return NULL;
-- 
2.43.0





[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux