]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - net/batman-adv/gateway_client.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
[karo-tx-linux.git] / net / batman-adv / gateway_client.c
index 27649e85f3f666b6131ae4becf367ce3a7b108d8..090828cf1fa7a5999a0dcec4f98bbf227b54d078 100644 (file)
@@ -592,15 +592,16 @@ static int batadv_write_buffer_text(struct batadv_priv *bat_priv,
 
        curr_gw = batadv_gw_get_selected_gw_node(bat_priv);
 
-       ret = seq_printf(seq, "%s %pM (%3i) %pM [%10s]: %u.%u/%u.%u MBit\n",
-                        (curr_gw == gw_node ? "=>" : "  "),
-                        gw_node->orig_node->orig,
-                        router_ifinfo->bat_iv.tq_avg, router->addr,
-                        router->if_incoming->net_dev->name,
-                        gw_node->bandwidth_down / 10,
-                        gw_node->bandwidth_down % 10,
-                        gw_node->bandwidth_up / 10,
-                        gw_node->bandwidth_up % 10);
+       seq_printf(seq, "%s %pM (%3i) %pM [%10s]: %u.%u/%u.%u MBit\n",
+                  (curr_gw == gw_node ? "=>" : "  "),
+                  gw_node->orig_node->orig,
+                  router_ifinfo->bat_iv.tq_avg, router->addr,
+                  router->if_incoming->net_dev->name,
+                  gw_node->bandwidth_down / 10,
+                  gw_node->bandwidth_down % 10,
+                  gw_node->bandwidth_up / 10,
+                  gw_node->bandwidth_up % 10);
+       ret = seq_has_overflowed(seq) ? -1 : 0;
 
        if (curr_gw)
                batadv_gw_node_free_ref(curr_gw);