From 0f675b4aff0fd400ceaaa3b08d38f7c527d62204 Mon Sep 17 00:00:00 2001 From: Axel Gembe Date: Sat, 21 Oct 2023 16:12:06 +0700 Subject: [PATCH] apc_modbus: Add an early exit if a USB regex is non-zero A minuscule optimization. Signed-off-by: Axel Gembe --- drivers/apc_modbus.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/apc_modbus.c b/drivers/apc_modbus.c index e4635d4c11..f365c2717b 100644 --- a/drivers/apc_modbus.c +++ b/drivers/apc_modbus.c @@ -1253,6 +1253,7 @@ void upsdrv_initups(void) for (i = 0; i < sizeof(regex_array) / sizeof(regex_array[0]); i++) { if (regex_array[i] != NULL) { has_nonzero_regex = 1; + break; } }