]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drivers/rtc/rtc-pcf8583.c: move assignment outside if condition
authorSachin Kamat <sachin.kamat@linaro.org>
Fri, 7 Jun 2013 00:08:53 +0000 (10:08 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 7 Jun 2013 05:42:49 +0000 (15:42 +1000)
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>
drivers/rtc/rtc-pcf8583.c

index 95886dcf4a39b6156d31c340d25c3bddb9ecf194..9971f7f7cac8c23381412d709b823c1c964eb552 100644 (file)
@@ -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;
        }