From: Lizhe <sensor1010@163.com>
To: linus.walleij@linaro.org
Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
Lizhe <sensor1010@163.com>
Subject: [PATCH v1] drivers/pinconf.c: Remove redundant check for the existence of the member
Date: Mon, 15 May 2023 00:59:32 +0800 [thread overview]
Message-ID: <20230514165932.251200-1-sensor1010@163.com> (raw)
"pin_config_set" in pinconf_ops.
In the function of registering pinctrl_dev, pinctrl_init_controller(),
a non-null check has already been performed on the members
pin_config_set and pin_config_group_set in the ops structure.
Signed-off-by: Lizhe <sensor1010@163.com>
---
drivers/pinctrl/pinconf.c | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/drivers/pinctrl/pinconf.c b/drivers/pinctrl/pinconf.c
index d9d54065472e..7b078d4ab61e 100644
--- a/drivers/pinctrl/pinconf.c
+++ b/drivers/pinctrl/pinconf.c
@@ -158,10 +158,6 @@ int pinconf_apply_setting(const struct pinctrl_setting *setting)
switch (setting->type) {
case PIN_MAP_TYPE_CONFIGS_PIN:
- if (!ops->pin_config_set) {
- dev_err(pctldev->dev, "missing pin_config_set op\n");
- return -EINVAL;
- }
ret = ops->pin_config_set(pctldev,
setting->data.configs.group_or_pin,
setting->data.configs.configs,
@@ -174,11 +170,6 @@ int pinconf_apply_setting(const struct pinctrl_setting *setting)
}
break;
case PIN_MAP_TYPE_CONFIGS_GROUP:
- if (!ops->pin_config_group_set) {
- dev_err(pctldev->dev,
- "missing pin_config_group_set op\n");
- return -EINVAL;
- }
ret = ops->pin_config_group_set(pctldev,
setting->data.configs.group_or_pin,
setting->data.configs.configs,
--
2.34.1
next reply other threads:[~2023-05-14 17:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-14 16:59 Lizhe [this message]
2023-05-14 21:10 ` andy.shevchenko
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=20230514165932.251200-1-sensor1010@163.com \
--to=sensor1010@163.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®