summaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-isl1208.c
diff options
context:
space:
mode:
authorSachin Kamat <sachin.kamat@linaro.org>2013-11-12 15:10:26 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2013-11-13 12:09:27 +0900
commitc91fd91d686654f8afbbbca18f5ff0a6ebc9c7a2 (patch)
tree4b0c363fe12b653afd9eabd426dedb816801a23d /drivers/rtc/rtc-isl1208.c
parent50ccf0455e51eba51e645b3724c8e932c75774b1 (diff)
downloadop-kernel-dev-c91fd91d686654f8afbbbca18f5ff0a6ebc9c7a2.zip
op-kernel-dev-c91fd91d686654f8afbbbca18f5ff0a6ebc9c7a2.tar.gz
drivers/rtc/rtc-isl1208.c: remove redundant checks
i2c_smbus_read_byte_data() returns negative errno on failure. Return the value obtained from it directly. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Cc: Herbert Valerio Riedel <hvr@gnu.org> Cc: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/rtc/rtc-isl1208.c')
-rw-r--r--drivers/rtc/rtc-isl1208.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/rtc/rtc-isl1208.c b/drivers/rtc/rtc-isl1208.c
index c016ad8..5a0bf7c 100644
--- a/drivers/rtc/rtc-isl1208.c
+++ b/drivers/rtc/rtc-isl1208.c
@@ -144,11 +144,7 @@ isl1208_i2c_validate_client(struct i2c_client *client)
static int
isl1208_i2c_get_sr(struct i2c_client *client)
{
- int sr = i2c_smbus_read_byte_data(client, ISL1208_REG_SR);
- if (sr < 0)
- return -EIO;
-
- return sr;
+ return i2c_smbus_read_byte_data(client, ISL1208_REG_SR);
}
static int
OpenPOWER on IntegriCloud