If the maximum number of wake-up attempts is exceeded, return -ETIMEDOUT.

Signed-off-by: Adrian Fiergolski <[email protected]>
---
 drivers/misc/atsha204a-i2c.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/misc/atsha204a-i2c.c b/drivers/misc/atsha204a-i2c.c
index 715dabb279..9d069fb33c 100644
--- a/drivers/misc/atsha204a-i2c.c
+++ b/drivers/misc/atsha204a-i2c.c
@@ -240,10 +240,10 @@ int atsha204a_wakeup(struct udevice *dev)
                }
 
                debug("success\n");
-               break;
+               return 0;
        }
 
-       return 0;
+       return -ETIMEDOUT;
 }
 
 int atsha204a_idle(struct udevice *dev)
-- 
2.34.1

Reply via email to