lkml.org 
[lkml]   [2022]   [Oct]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] platform/loongarch: laptop: simplify return of generic_subdriver_init()
Date
The error code in generic_subdriver_init() is always negative,
the return of generic_subdriver_init() can be simplified.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
drivers/platform/loongarch/loongson-laptop.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/platform/loongarch/loongson-laptop.c b/drivers/platform/loongarch/loongson-laptop.c
index a665fd1042ac..572290abf151 100644
--- a/drivers/platform/loongarch/loongson-laptop.c
+++ b/drivers/platform/loongarch/loongson-laptop.c
@@ -523,7 +523,7 @@ static int __init generic_subdriver_init(struct generic_sub_driver *sub_driver)

err_out:
generic_subdriver_exit(sub_driver);
- return (ret < 0) ? ret : 0;
+ return ret;
}

static void generic_subdriver_exit(struct generic_sub_driver *sub_driver)
--
2.25.1
\
 
 \ /
  Last update: 2022-10-13 15:14    [W:0.033 / U:0.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site