* + rtc-pcf8563-simplify-return-from-function.patch added to -mm tree
@ 2015-02-18 21:54 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2015-02-18 21:54 UTC (permalink / raw)
To: robert.r.kmiec, mm-commits
The patch titled
Subject: drivers/rtc/rtc-pcf8563.c: simplify return from function
has been added to the -mm tree. Its filename is
rtc-pcf8563-simplify-return-from-function.patch
This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/rtc-pcf8563-simplify-return-from-function.patch
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/rtc-pcf8563-simplify-return-from-function.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/SubmitChecklist when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: Robert Kmiec <robert.r.kmiec@gmail.com>
Subject: drivers/rtc/rtc-pcf8563.c: simplify return from function
This commit does not change any logic here. It just makes the code easier
to read.
This is how it looked like:
If err != 0 return err;
else return 0;
Signed-off-by: Robert Kmiec <robert.r.kmiec@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/rtc/rtc-pcf8563.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff -puN drivers/rtc/rtc-pcf8563.c~rtc-pcf8563-simplify-return-from-function drivers/rtc/rtc-pcf8563.c
--- a/drivers/rtc/rtc-pcf8563.c~rtc-pcf8563-simplify-return-from-function
+++ a/drivers/rtc/rtc-pcf8563.c
@@ -246,7 +246,6 @@ static int pcf8563_get_datetime(struct i
static int pcf8563_set_datetime(struct i2c_client *client, struct rtc_time *tm)
{
struct pcf8563 *pcf8563 = i2c_get_clientdata(client);
- int err;
unsigned char buf[9];
dev_dbg(&client->dev, "%s: secs=%d, mins=%d, hours=%d, "
@@ -272,12 +271,8 @@ static int pcf8563_set_datetime(struct i
buf[PCF8563_REG_DW] = tm->tm_wday & 0x07;
- err = pcf8563_write_block_data(client, PCF8563_REG_SC,
+ return pcf8563_write_block_data(client, PCF8563_REG_SC,
9 - PCF8563_REG_SC, buf + PCF8563_REG_SC);
- if (err)
- return err;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-02-18 21:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-18 21:54 + rtc-pcf8563-simplify-return-from-function.patch added to -mm tree akpm
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.