From: Qinglang Miao <miaoqinglang@huawei.com>
To: Johan Hovold <johan@kernel.org>
Cc: <linux-kernel@vger.kernel.org>, Qinglang Miao <miaoqinglang@huawei.com>
Subject: [PATCH -next] gnss: simplify the return expression of gnss_uevent
Date: Mon, 21 Sep 2020 21:10:28 +0800 [thread overview]
Message-ID: <20200921131028.91837-1-miaoqinglang@huawei.com> (raw)
Simplify the return expression.
Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
---
drivers/gnss/core.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/gnss/core.c b/drivers/gnss/core.c
index e6f94501c..e6b9ac9da 100644
--- a/drivers/gnss/core.c
+++ b/drivers/gnss/core.c
@@ -368,13 +368,8 @@ ATTRIBUTE_GROUPS(gnss);
static int gnss_uevent(struct device *dev, struct kobj_uevent_env *env)
{
struct gnss_device *gdev = to_gnss_device(dev);
- int ret;
- ret = add_uevent_var(env, "GNSS_TYPE=%s", gnss_type_name(gdev));
- if (ret)
- return ret;
-
- return 0;
+ return add_uevent_var(env, "GNSS_TYPE=%s", gnss_type_name(gdev));
}
static int __init gnss_module_init(void)
--
2.23.0
next reply other threads:[~2020-09-21 13:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-21 13:10 Qinglang Miao [this message]
2020-10-08 14:42 ` [PATCH -next] gnss: simplify the return expression of gnss_uevent Johan Hovold
2020-10-09 1:10 ` miaoqinglang
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=20200921131028.91837-1-miaoqinglang@huawei.com \
--to=miaoqinglang@huawei.com \
--cc=johan@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;
as well as URLs for NNTP newsgroup(s).