From: Ahmad Fatoum <ahmad@a3f.at>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <ahmad@a3f.at>
Subject: [PATCH 6/7] featctrl: drop useless NULL check
Date: Mon, 24 Apr 2023 14:18:04 +0200 [thread overview]
Message-ID: <20230424121805.150434-6-ahmad@a3f.at> (raw)
In-Reply-To: <20230424121805.150434-1-ahmad@a3f.at>
The only instance of calling featctrl_get_from_provider looks like this:
featctrl = featctrl_get_from_provider(&featctrl_args, &gateid);
Given that the function is static, there's no need to protect against
either argument being NULL, so drop the check.
Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
---
drivers/base/featctrl.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/base/featctrl.c b/drivers/base/featctrl.c
index f40b1f04bc1f..0b81f801058d 100644
--- a/drivers/base/featctrl.c
+++ b/drivers/base/featctrl.c
@@ -46,9 +46,6 @@ static struct feature_controller *featctrl_get_from_provider(struct of_phandle_a
struct feature_controller *featctrl;
int ret;
- if (!spec)
- return ERR_PTR(-EINVAL);
-
ret = of_device_ensure_probed(spec->np);
if (ret < 0)
return ERR_PTR(ret);
--
2.38.4
next prev parent reply other threads:[~2023-04-24 12:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-24 12:17 [PATCH 1/7] sandbox: watchdog: handle missing stickypage gracefully Ahmad Fatoum
2023-04-24 12:18 ` [PATCH 2/7] sandbox: power: " Ahmad Fatoum
2023-04-24 12:18 ` [PATCH 3/7] sandbox: hostfile: don't warn on failed hostfile fixup Ahmad Fatoum
2023-04-24 12:18 ` [PATCH 4/7] treewide: drop trailing space Ahmad Fatoum
2023-04-24 12:18 ` [PATCH 5/7] driver: be explicit about supported #feature-cells Ahmad Fatoum
2023-04-24 12:18 ` Ahmad Fatoum [this message]
2023-04-24 12:18 ` [PATCH 7/7] sandbox: hostfile: add feature controller support Ahmad Fatoum
2023-05-02 9:34 ` [PATCH 1/7] sandbox: watchdog: handle missing stickypage gracefully 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=20230424121805.150434-6-ahmad@a3f.at \
--to=ahmad@a3f.at \
--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