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:
c91fd91
)
drivers/rtc/rtc-max6900.c: remove redundant checks
author
Sachin Kamat
<
[email protected]
>
Tue, 12 Nov 2013 23:10:27 +0000
(15:10 -0800)
committer
Linus Torvalds
<
[email protected]
>
Wed, 13 Nov 2013 03:09:27 +0000
(12:09 +0900)
i2c_smbus_write_byte_data() returns negative errno on failure or 0 on
success. Return the value obtained from it directly.
Signed-off-by: Sachin Kamat <
[email protected]
>
Cc: Jingoo Han <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
drivers/rtc/rtc-max6900.c
patch
|
blob
|
history
diff --git
a/drivers/rtc/rtc-max6900.c
b/drivers/rtc/rtc-max6900.c
index 55969b1b771a344a69125e2d517f8a6cdfc8f335..4804985b876e850572d07c928e9913d8bd31175b 100644
(file)
--- a/
drivers/rtc/rtc-max6900.c
+++ b/
drivers/rtc/rtc-max6900.c
@@
-164,14
+164,7
@@
static int max6900_i2c_read_time(struct i2c_client *client, struct rtc_time *tm)
static int max6900_i2c_clear_write_protect(struct i2c_client *client)
{
- int rc;
- rc = i2c_smbus_write_byte_data(client, MAX6900_REG_CONTROL_WRITE, 0);
- if (rc < 0) {
- dev_err(&client->dev, "%s: control register write failed\n",
- __func__);
- return -EIO;
- }
- return 0;
+ return i2c_smbus_write_byte_data(client, MAX6900_REG_CONTROL_WRITE, 0);
}
static int