From: Sachin Kamat Date: Tue, 12 Nov 2013 23:10:26 +0000 (-0800) Subject: drivers/rtc/rtc-isl1208.c: remove redundant checks X-Git-Tag: upstream/snapshot3+hdmi~3995^2~68 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c91fd91d686654f8afbbbca18f5ff0a6ebc9c7a2;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git 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 Cc: Herbert Valerio Riedel Cc: Jingoo Han Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- 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