Skip to contentSkip to conversation

patch for FPGA

PATCH New Alan Tull 1 participant 2 messages Dec 8, 2017 FPGA manager framework

lore
Share & tools
lore

Alan Tull

author
#0 lore raw

PATCH 1/1 patch for FPGA

Hi Greg,

Please take this one small fix for fpga. It's been reviewed on the mailing list. It applies cleanly on linux-next/master.

Thanks,
Alan

Alexey Khoroshilov (1):
fpga: socfpga-a10: disable clk on error in socfpga_a10_fpga_probe()

 drivers/fpga/socfpga-a10.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
Signature · 1 line
2.7.4
author
#1 lore raw

PATCH 1/1 fpga: socfpga-a10: disable clk on error in socfpga_a10_fpga_probe()

From: Alexey Khoroshilov <[email protected]>

If fpga_mgr_register() fails, a clock is left undisabled.

Found by Linux Driver Verification project (linuxtesting.org).

---
 drivers/fpga/socfpga-a10.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/fpga/socfpga-a10.c +7 -1
index f8770af..a46e343 100644
@@ -519,8 +519,14 @@ static int socfpga_a10_fpga_probe(struct platform_device *pdev)
 		return -EBUSY;
 	}
 
-	return fpga_mgr_register(dev, "SoCFPGA Arria10 FPGA Manager",
+	ret = fpga_mgr_register(dev, "SoCFPGA Arria10 FPGA Manager",
 				 &socfpga_a10_fpga_mgr_ops, priv);
+	if (ret) {
+		clk_disable_unprepare(priv->clk);
+		return ret;
+	}
+
+	return 0;
 }
 
 static int socfpga_a10_fpga_remove(struct platform_device *pdev)
Signature · 1 line
2.7.4