diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2013-07-04 00:06:02 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-04 01:07:48 +0200 |
commit | d1bda80afd36c5eeb79a8f5a53c9b3e23350d3a9 (patch) | |
tree | a730017a51c58678c45cdad5dd907e3d44f4f7c2 | |
parent | drivers/rtc/rtc-pcf2123.c: remove space before tabs (diff) | |
download | linux-d1bda80afd36c5eeb79a8f5a53c9b3e23350d3a9.tar.xz linux-d1bda80afd36c5eeb79a8f5a53c9b3e23350d3a9.zip |
drivers/rtc/rtc-pcf8583.c: move assignment outside if condition
Fixes the following checkpatch error:
ERROR: do not use assignment in if condition
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.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 '')
-rw-r--r-- | drivers/rtc/rtc-pcf8583.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/rtc/rtc-pcf8583.c b/drivers/rtc/rtc-pcf8583.c index 95886dcf4a39..9971f7f7cac8 100644 --- a/drivers/rtc/rtc-pcf8583.c +++ b/drivers/rtc/rtc-pcf8583.c @@ -188,7 +188,8 @@ static int pcf8583_rtc_read_time(struct device *dev, struct rtc_time *tm) dev_warn(dev, "resetting control %02x -> %02x\n", ctrl, new_ctrl); - if ((err = pcf8583_set_ctrl(client, &new_ctrl)) < 0) + err = pcf8583_set_ctrl(client, &new_ctrl); + if (err < 0) return err; } |