[PATCH 3/3] fpga: bridge: remove needless error checking for device parameter

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

 



The bridge device is specifically created for purposes of the FPGA
bridge framework. There should thus be no naming clashes and
-ENOMEM is not a fatal error there either, because the PWM C API
is still usable without the device parameters.

Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx>
---
 drivers/fpga/fpga-bridge.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/fpga/fpga-bridge.c b/drivers/fpga/fpga-bridge.c
index 5db24cb5bd74..0ca8a2b513e9 100644
--- a/drivers/fpga/fpga-bridge.c
+++ b/drivers/fpga/fpga-bridge.c
@@ -183,7 +183,6 @@ int fpga_bridge_register(struct device *dev, const char *name,
 			 const struct fpga_bridge_ops *br_ops, void *priv)
 {
 	struct fpga_bridge *bridge;
-	struct param_d *p;
 	int ret = 0;
 
 	if (!name || !strlen(name)) {
@@ -213,10 +212,8 @@ int fpga_bridge_register(struct device *dev, const char *name,
 	dev->priv = bridge;
 
 	bridge->enable = 0;
-	p = dev_add_param_bool(&bridge->dev, "enable", set_enable,
-			       NULL, &bridge->enable, bridge);
-	if (IS_ERR(p))
-		return PTR_ERR(p);
+	dev_add_param_bool(&bridge->dev, "enable", set_enable,
+			   NULL, &bridge->enable, bridge);
 
 	of_platform_populate(dev->of_node, NULL, dev);
 
-- 
2.39.2





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux