projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
50ccf04
)
drivers/rtc/rtc-isl1208.c: remove redundant checks
author
Sachin Kamat
<
[email protected]
>
Tue, 12 Nov 2013 23:10:26 +0000
(15:10 -0800)
committer
Linus Torvalds
<
[email protected]
>
Wed, 13 Nov 2013 03:09:27 +0000
(12:09 +0900)
i2c_smbus_read_byte_data() returns negative errno on failure. Return the
value obtained from it directly.
Signed-off-by: Sachin Kamat <
[email protected]
>
Cc: Herbert Valerio Riedel <
[email protected]
>
Cc: Jingoo Han <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
drivers/rtc/rtc-isl1208.c
patch
|
blob
|
history
diff --git
a/drivers/rtc/rtc-isl1208.c
b/drivers/rtc/rtc-isl1208.c
index c016ad81767a9d1be4697c267072a124f4398fc6..5a0bf7ce103342443c0621888595217385399724 100644
(file)
--- 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