mirror of
https://github.com/torvalds/linux.git
synced 2024-11-25 21:51:40 +00:00
atm: clean up vcc_seq_next()
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 <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
4057765f2d
commit
d0edde8d29
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user