Merge branch 'linux-linaro-lsk' into linux-linaro-lsk-android
[firefly-linux-kernel-4.4.55.git] / drivers / cpufreq / cpufreq_interactive.c
index 12376ae07de8f6ed14f0cc47d75d04a9871b024e..c08831720fa92d3263fa43c2fbef66240854e2ac 100644 (file)
@@ -713,7 +713,7 @@ static ssize_t show_target_loads(
                ret += sprintf(buf + ret, "%u%s", tunables->target_loads[i],
                               i & 0x1 ? ":" : " ");
 
-       ret += sprintf(buf + --ret, "\n");
+       sprintf(buf + ret - 1, "\n");
        spin_unlock_irqrestore(&tunables->target_loads_lock, flags);
        return ret;
 }
@@ -753,7 +753,7 @@ static ssize_t show_above_hispeed_delay(
                               tunables->above_hispeed_delay[i],
                               i & 0x1 ? ":" : " ");
 
-       ret += sprintf(buf + --ret, "\n");
+       sprintf(buf + ret - 1, "\n");
        spin_unlock_irqrestore(&tunables->above_hispeed_delay_lock, flags);
        return ret;
 }