Messages in this thread Patch in this message | | | From | Yangtao Li <> | Subject | [PATCH v2 3/3] fpga: socfpga-a10: Fix incorrect return value of devm_regmap_init_mmio | Date | Mon, 10 Jul 2023 21:38:30 +0800 |
| |
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@vivo.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
| |