[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230710133830.65631-3-frank.li@vivo.com>
Date: Mon, 10 Jul 2023 21:38:30 +0800
From: Yangtao Li <frank.li@...o.com>
To: Moritz Fischer <mdf@...nel.org>, Wu Hao <hao.wu@...el.com>,
Xu Yilun <yilun.xu@...el.com>, Tom Rix <trix@...hat.com>,
Alan Tull <atull@...nsource.altera.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Yangtao Li <frank.li@...o.com>,
Moritz Fischer <moritz.fischer@...us.com>,
linux-fpga@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH v2 3/3] fpga: socfpga-a10: Fix incorrect return value of devm_regmap_init_mmio
When devm_regmap_init_mmio fails, we should return PTR_ERR(priv->regmap)
instead of -ENODEV.
Fixes: acbb910ae04b ("fpga-manager: Add Socfpga Arria10 support")
Signed-off-by: Yangtao Li <frank.li@...o.com>
---
drivers/fpga/socfpga-a10.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/fpga/socfpga-a10.c b/drivers/fpga/socfpga-a10.c
index cc4861e345c9..b7b6e0bdb3d9 100644
--- a/drivers/fpga/socfpga-a10.c
+++ b/drivers/fpga/socfpga-a10.c
@@ -491,7 +491,7 @@ static int socfpga_a10_fpga_probe(struct platform_device *pdev)
priv->regmap = devm_regmap_init_mmio(dev, reg_base,
&socfpga_a10_fpga_regmap_config);
if (IS_ERR(priv->regmap))
- return -ENODEV;
+ return PTR_ERR(priv->regmap);
priv->clk = devm_clk_get(dev, NULL);
if (IS_ERR(priv->clk)) {
--
2.39.0
Powered by blists - more mailing lists