[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1284317845-5181-1-git-send-email-segooon@gmail.com>
Date: Sun, 12 Sep 2010 22:57:24 +0400
From: Vasiliy Kulikov <segooon@...il.com>
To: kernel-janitors@...r.kernel.org
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Gregory Bean <gbean@...eaurora.org>,
linux-kernel@...r.kernel.org
Subject: [PATCH] gpio: sx150x: fix error code value
The return code of sx150x_get_io() is propagated as error code,
so it should look like standard code.
Signed-off-by: Vasiliy Kulikov <segooon@...il.com>
---
Compile tested.
drivers/gpio/sx150x.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/gpio/sx150x.c b/drivers/gpio/sx150x.c
index b42f42c..b0eed89 100644
--- a/drivers/gpio/sx150x.c
+++ b/drivers/gpio/sx150x.c
@@ -179,7 +179,7 @@ static int sx150x_get_io(struct sx150x_chip *chip, unsigned offset)
sx150x_find_cfg(offset, 1, ®, &mask, &shift);
err = sx150x_i2c_read(chip->client, reg, &data);
if (err >= 0)
- err = (data & mask) != 0 ? 1 : 0;
+ err = (data & mask) != 0 ? -EIO : 0;
return err;
}
--
1.7.0.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists