Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Robert Kmiec and committed by
Linus Torvalds
b0c57b59 6e54abac

+1 -6
+1 -6
drivers/rtc/rtc-pcf8563.c
··· 246 246 static int pcf8563_set_datetime(struct i2c_client *client, struct rtc_time *tm) 247 247 { 248 248 struct pcf8563 *pcf8563 = i2c_get_clientdata(client); 249 - int err; 250 249 unsigned char buf[9]; 251 250 252 251 dev_dbg(&client->dev, "%s: secs=%d, mins=%d, hours=%d, " ··· 271 272 272 273 buf[PCF8563_REG_DW] = tm->tm_wday & 0x07; 273 274 274 - err = pcf8563_write_block_data(client, PCF8563_REG_SC, 275 + return pcf8563_write_block_data(client, PCF8563_REG_SC, 275 276 9 - PCF8563_REG_SC, buf + PCF8563_REG_SC); 276 - if (err) 277 - return err; 278 - 279 - return 0; 280 277 } 281 278 282 279 #ifdef CONFIG_RTC_INTF_DEV