[PATCH] platform/loongarch: laptop: simplify return of generic_subdriver_init()

From: Yang Yingliang
Date: Thu Oct 13 2022 - 09:13:45 EST


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@xxxxxxxxxx>
---
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