[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200921131028.91837-1-miaoqinglang@huawei.com>
Date: Mon, 21 Sep 2020 21:10:28 +0800
From: Qinglang Miao <miaoqinglang@...wei.com>
To: Johan Hovold <johan@...nel.org>
CC: <linux-kernel@...r.kernel.org>,
Qinglang Miao <miaoqinglang@...wei.com>
Subject: [PATCH -next] gnss: simplify the return expression of gnss_uevent
Simplify the return expression.
Signed-off-by: Qinglang Miao <miaoqinglang@...wei.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
Powered by blists - more mailing lists