summaryrefslogtreecommitdiffstats
path: root/net/atm/proc.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2019-02-14 09:56:35 +0300
committerDavid S. Miller <davem@davemloft.net>2019-02-16 18:12:22 -0800
commitd0edde8d29887831c38c419728d5e0cab2419b88 (patch)
tree5efcc4dc0a6552716074ed85e8c67855ed77d3c7 /net/atm/proc.c
parent4057765f2dee79cb92f9067909477303360be8d3 (diff)
downloadlinux-d0edde8d29887831c38c419728d5e0cab2419b88.tar.gz
linux-d0edde8d29887831c38c419728d5e0cab2419b88.tar.bz2
linux-d0edde8d29887831c38c419728d5e0cab2419b88.zip
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>
Diffstat (limited to 'net/atm/proc.c')
-rw-r--r--net/atm/proc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/atm/proc.c b/net/atm/proc.c
index 0b0495a41bbe..d79221fd4dae 100644
--- a/net/atm/proc.c
+++ b/net/atm/proc.c
@@ -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;
}