Skip to contentSkip to conversation

rtc: test: do not use assignment in if condition

PATCH New Alexandre Belloni 1 participant 1 message Mar 20, 2019 Real time clock (RTC)

lore
Share & tools
lore

Alexandre Belloni

author maintainer
#0 lore raw

PATCH 1/1 rtc: test: do not use assignment in if condition

Fix checkpatch error:
drivers/rtc/rtc-test.c:155: ERROR: do not use assignment in if condition

---
 drivers/rtc/rtc-test.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/rtc/rtc-test.c +2 -1
index 6c5f09c815e8..f1a6dc5ad013 100644
@@ -152,7 +152,8 @@ static int __init test_init(void)
 {
 	int i, err;
 
-	if ((err = platform_driver_register(&test_driver)))
+	err = platform_driver_register(&test_driver);
+	if (err)
 		return err;
 
 	err = -ENOMEM;
Signature · 1 line
2.20.1