From 8dd249440704444e285f4e5b440f8b291f2fff3b Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Tue, 1 Nov 2016 15:13:09 -0600 Subject: [PATCH] Review of last PR: Fix return value (ERROR is not a value return value in this context). Fix some spacing. --- drivers/mtd/at24xx.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/mtd/at24xx.c b/drivers/mtd/at24xx.c index 7b4e38962e0..936008a5672 100644 --- a/drivers/mtd/at24xx.c +++ b/drivers/mtd/at24xx.c @@ -280,8 +280,9 @@ static int at24c_eraseall(FAR struct at24c_dev_s *priv) finfo("wait\n"); if (!wait--) { - return ERROR; + return -ETIMEDOUT; } + usleep(1000); } @@ -345,8 +346,9 @@ static ssize_t at24c_read_internal(FAR struct at24c_dev_s *priv, off_t offset, finfo("wait\n"); if (!wait--) { - return ERROR; + return -ETIMEDOUT; } + usleep(1000); } @@ -467,8 +469,9 @@ static ssize_t at24c_bwrite(FAR struct mtd_dev_s *dev, off_t startblock, size_t finfo("wait\n"); if (!wait--) { - return ERROR; + return -ETIMEDOUT; } + usleep(1000); }