Skip to contentSkip to conversation

ahci_xgene: Fix the error print invalid resource for APM X-Gene SoC AHCI SATA Host Controller driver.

PATCH New Suman Tripathi 2 participants 2 messages Sep 22, 2014 – Sep 23, 2014 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/1 ahci_xgene: Fix the error print invalid resource for APM X-Gene SoC AHCI SATA Host Controller driver.

This patch fixes the error print invalid resource for the APM X-Gene SoC AHCI SATA Host Controller driver. This print was due to the fact that the controller 3 don't have a mux resource. This didn't result in any errors but the print seems like meaningless.

---
 drivers/ata/ahci_xgene.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
drivers/ata/ahci_xgene.c +8 -2
index 40d0a76..26f1f78 100644
@@ -434,7 +434,7 @@ static int xgene_ahci_mux_select(struct xgene_ahci_context *ctx)
 	u32 val;
 
 	/* Check for optional MUX resource */
-	if (IS_ERR(ctx->csr_mux))
+	if (!ctx->csr_mux)
 		return 0;
 
 	val = readl(ctx->csr_mux + SATA_ENET_CONFIG_REG);
@@ -485,7 +485,13 @@ static int xgene_ahci_probe(struct platform_device *pdev)
 
 	/* Retrieve the optional IP mux resource */
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 4);
-	ctx->csr_mux = devm_ioremap_resource(dev, res);
+	if (res) {
+		void __iomem *csr = devm_ioremap_resource(dev, res);
+		if (IS_ERR(csr))
+			return PTR_ERR(csr);
+
+		ctx->csr_mux = csr;
+	}
 
 	dev_dbg(dev, "VAddr 0x%p Mmio VAddr 0x%p\n", ctx->csr_core,
 		hpriv->mmio);

--
1.8.2.1

Applied
#2 lore raw

PATCH 1/1 ahci_xgene: Fix the error print invalid resource for APM X-Gene SoC AHCI SATA Host Controller driver.

Quoted 7 lines · Suman Tripathi

This patch fixes the error print invalid resource for the APM X-Gene SoC AHCI SATA Host Controller driver. This print was due to the fact that the controller 3 don't have a mux resource. This didn't result in any errors but the print seems like meaningless.

Applied to libata/for-3.18.

Thanks.

Signature · 1 line
tejun