UPSTREAM: clk: rockchip: include downstream muxes into fractional dividers
[firefly-linux-kernel-4.4.55.git] / net / activity_stats.c
index 4609ce2043eb3677905b5ad5decc803e9cd40b7b..3bf92d80b8b93f7825a3a8005b2b7261d73bf3cc 100644 (file)
@@ -63,14 +63,13 @@ void activity_stats_update(void)
 static int activity_stats_show(struct seq_file *m, void *v)
 {
        int i;
-       int ret;
 
        seq_printf(m, "Min Bucket(sec) Count\n");
 
        for (i = 0; i < BUCKET_MAX; i++) {
-               ret = seq_printf(m, "%15d %lu\n", 1 << i, activity_stats[i]);
-               if (ret)
-                       return ret;
+               seq_printf(m, "%15d %lu\n", 1 << i, activity_stats[i]);
+               if (seq_has_overflowed(m))
+                       return -ENOSPC;
        }
 
        return 0;