]> 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>
Thu, 9 May 2013 23:57:33 +0000 (09:57 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 21 May 2013 04:17:50 +0000 (14:17 +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;
        }