Commit c91fd91d authored by Sachin Kamat's avatar Sachin Kamat Committed by Linus Torvalds

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: default avatarSachin Kamat <sachin.kamat@linaro.org>
Cc: Herbert Valerio Riedel <hvr@gnu.org>
Cc: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 50ccf045
...@@ -144,11 +144,7 @@ isl1208_i2c_validate_client(struct i2c_client *client) ...@@ -144,11 +144,7 @@ isl1208_i2c_validate_client(struct i2c_client *client)
static int static int
isl1208_i2c_get_sr(struct i2c_client *client) isl1208_i2c_get_sr(struct i2c_client *client)
{ {
int sr = i2c_smbus_read_byte_data(client, ISL1208_REG_SR); return i2c_smbus_read_byte_data(client, ISL1208_REG_SR);
if (sr < 0)
return -EIO;
return sr;
} }
static int static int
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment