Skip to content

Commit

Permalink
atm: clean up vcc_seq_next()
Browse files Browse the repository at this point in the history
It's confusing to call PTR_ERR(v).  The PTR_ERR() function is basically
a fancy cast to long so it makes you wonder, was IS_ERR() intended?  But
that doesn't make sense because vcc_walk() doesn't return error
pointers.

This patch doesn't affect runtime, it's just a cleanup.

Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Dan Carpenter authored and davem330 committed Feb 17, 2019
1 parent 4057765 commit d0edde8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion net/atm/proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@ static void vcc_seq_stop(struct seq_file *seq, void *v)
static void *vcc_seq_next(struct seq_file *seq, void *v, loff_t *pos)
{
v = vcc_walk(seq, 1);
*pos += !!PTR_ERR(v);
if (v)
(*pos)++;
return v;
}

Expand Down

0 comments on commit d0edde8

Please sign in to comment.