Skip to contentSkip to conversation

platform/loongarch: laptop: simplify return of generic_subdriver_init()

PATCH New Yang Yingliang 1 participant 1 message Oct 13, 2022

lore
Share & tools
lore
#0 lore raw

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

The error code in generic_subdriver_init() is always negative, the return of generic_subdriver_init() can be simplified.

---
 drivers/platform/loongarch/loongson-laptop.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/loongarch/loongson-laptop.c +1 -1
index a665fd1042ac..572290abf151 100644
@@ -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)
Signature · 1 line
2.25.1