Commit 92b839175064632813a7c4b7e180efde4c08c850

Authored by Joe Perches
Committed by David S. Miller
1 parent 059a2440fd

batman-adv: Fix use of seq_has_overflowed()

net-next commit 6d91147d183c ("batman-adv: Remove uses of return value
of seq_printf") incorrectly changed the overflow occurred return from
-1 to 1.  Change it back so that the test of batadv_write_buffer_text's
return value in batadv_gw_client_seq_print_text works properly.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

net/batman-adv/gateway_client.c
... ... @@ -601,7 +601,7 @@
601 601 gw_node->bandwidth_down % 10,
602 602 gw_node->bandwidth_up / 10,
603 603 gw_node->bandwidth_up % 10);
604   - ret = seq_has_overflowed(seq);
  604 + ret = seq_has_overflowed(seq) ? -1 : 0;
605 605  
606 606 if (curr_gw)
607 607 batadv_gw_node_free_ref(curr_gw);