From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH 3/3] fpga: bridge: remove needless error checking for device parameter
Date: Mon, 1 Jul 2024 09:35:26 +0200 [thread overview]
Message-ID: <20240701073526.176353-3-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20240701073526.176353-1-a.fatoum@pengutronix.de>
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@pengutronix.de>
---
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
next prev parent reply other threads:[~2024-07-01 7:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-01 7:35 [PATCH 1/3] e1000: mtd: " Ahmad Fatoum
2024-07-01 7:35 ` [PATCH 2/3] PWM: core: " Ahmad Fatoum
2024-07-01 7:35 ` Ahmad Fatoum [this message]
2024-07-01 9:33 ` [PATCH 1/3] e1000: mtd: " Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240701073526.176353-3-a.fatoum@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox