summaryrefslogtreecommitdiff
path: root/drivers/rtc/rtc-rp5c01.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2015-11-04 01:29:03 +0300
committerTejun Heo <tj@kernel.org>2015-11-04 01:29:03 +0300
commit159b5bb46492e4dcef2070b12861030bc360402b (patch)
tree93de7d6e94a059aade50ee5437de6a50ccd1cf7b /drivers/rtc/rtc-rp5c01.c
parent56e74338a535cbcc2f2da08b1ea1a92920194364 (diff)
parent469eabb3aec03d9defed3462df743a223a5c8f54 (diff)
downloadlinux-159b5bb46492e4dcef2070b12861030bc360402b.tar.xz
Merge branch 'for-4.3-fixes' into for-4.4
Diffstat (limited to 'drivers/rtc/rtc-rp5c01.c')
-rw-r--r--drivers/rtc/rtc-rp5c01.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/rtc/rtc-rp5c01.c b/drivers/rtc/rtc-rp5c01.c
index b548551f385c..026035373ae6 100644
--- a/drivers/rtc/rtc-rp5c01.c
+++ b/drivers/rtc/rtc-rp5c01.c
@@ -170,7 +170,7 @@ static ssize_t rp5c01_nvram_read(struct file *filp, struct kobject *kobj,
spin_lock_irq(&priv->lock);
- for (count = 0; size > 0 && pos < RP5C01_MODE; count++, size--) {
+ for (count = 0; count < size; count++) {
u8 data;
rp5c01_write(priv,
@@ -200,7 +200,7 @@ static ssize_t rp5c01_nvram_write(struct file *filp, struct kobject *kobj,
spin_lock_irq(&priv->lock);
- for (count = 0; size > 0 && pos < RP5C01_MODE; count++, size--) {
+ for (count = 0; count < size; count++) {
u8 data = *buf++;
rp5c01_write(priv,