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

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: default avatarSachin Kamat <sachin.kamat@linaro.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 369015fb
...@@ -188,7 +188,8 @@ static int pcf8583_rtc_read_time(struct device *dev, struct rtc_time *tm) ...@@ -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", dev_warn(dev, "resetting control %02x -> %02x\n",
ctrl, new_ctrl); ctrl, new_ctrl);
if ((err = pcf8583_set_ctrl(client, &new_ctrl)) < 0) err = pcf8583_set_ctrl(client, &new_ctrl);
if (err < 0)
return err; return err;
} }
......
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