From e1d1e1349a5e72334c001087f47db861af9ec512 Mon Sep 17 00:00:00 2001 From: Werner Sembach Date: Tue, 13 Jun 2023 14:56:16 +0200 Subject: [PATCH] Fix retry logic --- src/uniwill_keyboard.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/uniwill_keyboard.h b/src/uniwill_keyboard.h index ab3f2e3..20dcc02 100644 --- a/src/uniwill_keyboard.h +++ b/src/uniwill_keyboard.h @@ -111,10 +111,10 @@ int uniwill_read_ec_ram_with_retry(u16 address, u8 *data, int retries) for (i = 0; i < retries; ++i) { status = uniwill_read_ec_ram(address, data); - if (status != 0) { + if (status != 0) pr_debug("uniwill_read_ec_ram(...) failed.\n"); + else break; - } } return status;