linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] gnss: simplify the return expression of gnss_uevent
@ 2020-09-21 13:10 Qinglang Miao
  2020-10-08 14:42 ` Johan Hovold
  0 siblings, 1 reply; 3+ messages in thread
From: Qinglang Miao @ 2020-09-21 13:10 UTC (permalink / raw)
  To: Johan Hovold; +Cc: linux-kernel, Qinglang Miao

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-10-09  1:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-21 13:10 [PATCH -next] gnss: simplify the return expression of gnss_uevent Qinglang Miao
2020-10-08 14:42 ` Johan Hovold
2020-10-09  1:10   ` miaoqinglang

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).