* [PATCH] platform/loongarch: laptop: simplify return of generic_subdriver_init()
@ 2022-10-13 13:12 Yang Yingliang
0 siblings, 0 replies; only message in thread
From: Yang Yingliang @ 2022-10-13 13:12 UTC (permalink / raw)
To: linux-kernel; +Cc: lvjianmin, chenhuacai, chenhuacai
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-10-13 13:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-13 13:12 [PATCH] platform/loongarch: laptop: simplify return of generic_subdriver_init() Yang Yingliang
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).